Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#16 2025-05-22 18:42:18

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,440
Website GitHub

Re: Filter by multiple categories

And one more thing, is there a tag-based way to output a nested category list using ul/li tags that mimics the Categories structure, given an arbitrary start point in the tree? I can’t see a way of finding out what ‘level’ we’re at without resorting to PHP and inspecting $thiscategory.


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

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#17 2025-05-22 19:06:57

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

Re: Filter by multiple categories

Bloke wrote #339739:

And one more thing, is there a tag-based way to output a nested category list using ul/li tags that mimics the Categories structure, given an arbitrary start point in the tree?

Valueless children?

<txp:category_list parent="daddy" children wraptag="ul" break="li" />

Offline

#18 2025-05-22 19:09:51

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

Re: Filter by multiple categories

Bloke wrote #339738:

What if I wanted to include articles that are in descendent (sub-)categories of the category given in the URL?

Probably <txp:article_custom depth ... />

Offline

#19 2025-05-22 19:26:44

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,440
Website GitHub

Re: Filter by multiple categories

etc wrote #339740:

Valueless children?

Perfect. That needs documenting EDIT: Documented. Well, commited but it’s not showing on the docs site even though it’s allegedly deployed. Hmm…

etc wrote #339741:

Probably <txp:article_custom depth ... />

Is that a 4.9 thing? Doesn’t seem to work on 4.8.8, and it’s not documented. Drat.

No biggie if so. I’ll stick with the longhand approach for now and upgrade to depth when the site is upgraded. Thank you!


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

Hire Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB