Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2022-06-16 13:49:17

sambooth74
Member
From: Leeds, England
Registered: 2020-11-24
Posts: 18
Website

Older/newer with parent/child nested categories

I use a nested category structure to organise my content.

I need the category pages to show articles in child categories in addition to the current category.

I can achieve this using the article_custom tag and the parent attribute, but then the older and newer tags don’t work, so I have no pagination feature.

Could anybody suggest a workaround for this issue please?

I’m starting to think that the nested category structure is not a good way of organising my content!

Many thanks

Offline

#2 2022-06-16 14:09:02

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

Re: Older/newer with parent/child nested categories

You should be able to include also child categories in <txp:article /> with depth attribute:

<txp:article depth="1" /> <!-- or more -->

If this does not work, <txp:article_custom pageby /> should be able to paginate.

Offline

#3 2022-06-16 14:47:16

sambooth74
Member
From: Leeds, England
Registered: 2020-11-24
Posts: 18
Website

Re: Older/newer with parent/child nested categories

That does work, many thanks.

The depth attribute isn’t in the documentation but will be very useful to me going forward.

Offline

#4 2022-06-16 21:23:07

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

Re: Older/newer with parent/child nested categories

sambooth74 wrote #333600:

The depth attribute isn’t in the documentation…

Please feel free to submit a patch, this would be a truly win-win way to improve the docs.

Offline

Board footer

Powered by FluxBB