Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
related articles feat. children
the txp:related_articles tag provides a list with articles of the same category.
but it wont show the children of these categories..
Offline
#2 2009-10-28 12:16:30
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,306
Re: related articles feat. children
<txp:category_list break=","><txp:category /></txp:category_list>
produces a list of all parent and child categories. Would that work, tags in tags?
Edit: added break parameter.
Last edited by uli (2009-10-28 12:19:04)
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: related articles feat. children
i now use chh_related
thanks for watching.
edit:
by the way: your solution puts out a category list od all categories.
i only want to put out the related and childs of related categories..
Last edited by jens31 (2009-10-28 14:39:31)
Offline
#4 2009-10-28 17:36:32
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: related articles feat. children
In the article form (not tested):
<txp:article_custom category='<txp:category_list parent=''<txp:category1 />'' break=","><txp:category /></txp:category_list><txp:if_article_category number="2">,<txp:category_list parent=''<txp:category2 />'' break=","><txp:category /></txp:category_list></txp:if_article_category>' wraptag="ul" break="li">
<txp:permlink><txp:title /></txp:permlink>
</txp:article_custom>
Offline
Re: related articles feat. children
i made it this way:
<txp:category_list break="" parent='<txp:category1 />' exclude='<txp:category1 />'>
<txp:article_custom category='<txp:category />' form="articleSmallRelated" limit="1" sort="Posted desc" />
</txp:category_list>
(watch out for the quotation marks, they look weird in the preview..)
Offline