Usage
The Dandy Cat add-on can be used exactly like the standard exp:channel:entries tag. The only difference is that it gives you additional power in the categories= tag parameter.
Without Dandy Cat, there are four basic ways to look up categories:
{exp:channel:entries ... categories="3&7"}
{exp:channel:entries ... categories="2|5|7"}
{exp:channel:entries ... categories="not 3&7"}
{exp:channel:entries ... categories="not 2|5|7"}
There is no mixing and matching allowed because it would be very confusing. Take this next example. Should we show the categories which are
- not in categories 2 or 5, and which is in category 7 ?
- not in category 2, or in categories 5 and 7 ?
- not in category 2, but in both categories 5 and 7 ?
{exp:channel:entries ... categories="not 2|5&7"}
If we could allow the designer to group his category parameters, his intentions would become clear:
{exp:dandy_cat:entries ... categories="(not 2|5)&(7)"}
{exp:dandy_cat:entries ... categories="(not 2)|(not 5&7)"}
{exp:dandy_cat:entries ... categories="(not 2)|(5&7)"}
With Dandy Cat, the problem is solved.
Example - Show Entries in the Artwork & People Categories, but Which Are not in Buildings, Mountains, Water
<h1>Non-scenic artwork of People</h1>
{exp:dandy_cat:entries channel="images" category="(3&7)&(not 2|5|6)" orderby="title" sort="asc"}
<div class="image-thumb">
<h2><a href="/gallery/{url_title}">{title}</a></h2>
<img src="{image:sized}" alt="{title}" />
</div>
{paginate}{pagination_links}{/paginate}
{/exp:dandy_cat:entries}