Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
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