I have a series of entries in a channel called "Messages" that need to appear in different ways according to if ALL categories have been assigned, or if less than all have been assigned.
The most obvious (to me) does not seem to be working:
{exp:channel:entries channel="message" status="flex" orderby="date" sort="desc"} {exp:channel:categories category_group="2"} {if category_id == (12 && 13 && 14 && 15)} All the categories have been checked for this entry {if:else} Otherwise {/if} {/exp:channel:categories} {/exp:channel:entries}
I have also tried using the {exp:channel:entries}
tag pair:
{exp:channel:entries channel="message" category="12&13&14&15" orderby="date" sort="desc"}
This channel:entries approach works, but I don't know how to make the query say: "List the entries that do not have ALL FOUR categories checked". (In other words, if you simply do a second loop that filters "12||13||14||15" it will also catch the entries that have all four categories checked.
What is the best way to do this:
- Show any entry with categories 12,13,14 and 15 ALL checked.
- And then further down the page, show any entry that has ANY of, but NOT ALL of the categories 12,13, and 15 checked.
?