Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2025-03-27 20:51:13

etc
Developer
Registered: 2010-11-11
Posts: 5,342
Website GitHub

Re: Filter by multiple categories

The tag compares category (current or specified) against a list of names:

<txp:if_category category="apple" name="apple, banana, cherry" /> <!-- yes! -->

So

<txp:if_category name="apple, banana, cherry" />

checks whether the current category is in the list. But there is no current category on /category/apple/banana/ page, as we know.

Offline

#14 2025-03-27 21:01:09

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,677
Website GitHub

Re: Filter by multiple categories

Ah of course. That could probably be clearer in the docs.

*adds it to the never-ending Todo list*


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB