Is there a way to add a condition like {if results} or {if empty} when searching for a category in a channel entry?
{if a category 41 is selected display}Category Group Name: {categories show_group="41"}{category_name} {/categories}{/if}
I have a number of category groups in my channel. When displaying the selections I want to first show a heading (category group name) then the selected categories. If nothing is selected I don't want anything to show.
I am testing: http://devot-ee.com/add-ons/jco-entry-catcount
{exp:jco_entry_catcount entry_id="{entry_id}" category_group_id="41":} {if nbrcategories > 0} Provincial Riding: {categories show_group="41"}{category_name} {/categories}
{/if} {/exp:jco_entry_catcount}{exp:jco_entry_catcount entry_id="{entry_id}" category_group_id="39":} {if nbrcategories > 0} Federal Riding: {categories show_group="39"}{category_name} {/categories}
{/if} {/exp:jco_entry_catcount}