07/01/2013 at 5:06 pm
#264049
Guest
I’ve been working on some customizations to cmap and would like to display the category list for each item, which I’ve done by calling the categories in the card.php file as such:
<?php $categories = $entry->getCategory();
if ( !empty($categories) )
{
$i = 0;
foreach ($categories as $category)
{
echo $category->name;
$i++;
if ( count($categories) > $i ) echo ', ';
}
unset($i);
}?>
I’d also like to make the categories searchable, but for the moment I’m having trouble making the basic search function return results. If I search for the word “computer” but the word “computers” (plural) is included in a searchable field, no results are returned.
Suggestions?