PDA

View Full Version : Excluding multiple categories


Neticus
05-11-2006, 07:00 PM
As most of you know this command excludes anything from appearing on the homepage which is Cat 0

{if $category.ID gt 0}
Content
{/if}

Anyone know how to edit to exclude multiple categories??? e.g. also exclude cat 1 and 2

I've tried but to no avail....


Thanks

rayovac
05-12-2006, 04:14 AM
Here are the meanings:

gt = greater than
lt = less than
eq = equals

To exclude category 0, 1 and 2:

{if $category.ID gt 2}
Content
{/if}

You can also do multiple comparisons, such as:

Content visible to registered users only.

I use this to display a message on immediate subcategory pages. Since I have 18 categories, and I want to exclude the front page, I use gt 0 and lt 19.

Hope this helps.

Neticus
05-12-2006, 05:26 PM
Hey thanks for tutorial was able to get result.

cheers.