I have a channel that has entries that can have 0-10 categories assigned to an individual entry. I need to conditionally display one link or another based on whether a specific category is among the selected categories. Basically in pseduo code this would be:
{if category == "magic-category"}
DISPLAY THIS LINK
{if:else}
DISPLAY THIS OTHER LINK
{/if}The problem is, this doesn’t seem to work with the way you access categories in a EE entry. Since I can only access categories through the {category} entry pair that means it will loop through my conditional for every category that is selected for the entry. I only want that link to show up once. But if the entry had 3 categories selected, 3 links would show up. And if the entry had 0 categories, 0 links would show up.
So how can I accomplish what I am wanting to do?