Multi Select Pick List
I have a pod that has a multi select Pick list. The pod item (beers) can have one or more items selected (bottled, cask, limited edition etc).
On the listing page where all the beers are listed I want to display an icon for each of these selected items. With a boolean pod field (checkbox) I can use the following code to decide whether to show something or not:
<?php if ({@sellable}=="1"): ?>
<p>Show this if for sale</p>
<?php endif; ?>
With the multi select pick field I am using the following:
<?php if ({@beer_type.name}=="Bottled"): ?>
<p>Show this if bottled</p>
<?php endif; ?>
This works OK if only one of the items in the pick list is chosen, but if two or more ore chosen then i get the following error:
Parse error: syntax error, unexpected T_IS_EQUAL, expecting '(' in /home/w/t/wtbrewery/www/wp-content/plugins/pods/classes/Pod.php(778) : eval()'d code on line 23
I guess @beer_type is an array of the selected values. How can I check whether a particular string/item is in the selected list?
Thanks Tommy


