Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2017-09-23 10:17:09

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

Re: how to use sub-categories in <txp:if_category name ... ?

ruud wrote #307198:

Does this match category ‘afghanistan’ as well …?

Yes, everything related to “afghanistan”. If needed, some special value for parent could exclude the parent itself (see below).

Would this also work: <txp:if_category parent="afghanistan" />

No, because parent is reserved for the ascendancy level: parent="2" means grandfather. Could be adapted in this way for non-numeric values, but I don’t know how to combine parent and name in this case.

Not sure if this might be clearer: <txp:if_category child name="afghanistan" />

Not sure neither. :-) It could mean “if category has a child called afghanistan” as well. Why not, btw?

Offline

Board footer

Powered by FluxBB