Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-12-19 13:25:39

Gallex
Member
Registered: 2006-10-08
Posts: 1,315

section specific category list

my code:

<txp:if_section name="linnualad,linnuliigid">
<txp:if_article_list>
<txp:category_list>
<txp:if_different><txp:category section='<txp:section />' title="1" wraptag="h4" /></txp:if_different>
<txp:article_custom category='<txp:category />' wraptag="ul" break="li">
<txp:permlink><txp:title /></txp:permlink></txp:article_custom>
</txp:category_list>
<txp:else />
<txp:article limit="1" />
</txp:if_article_list>
<txp:if_section>

this displays all article category lists under both section, but i need it to display section specificly. is this possible?

Last edited by Gallex (2011-12-19 14:25:00)

Offline

#2 2011-12-19 14:30:51

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: section specific category list

If you create parent categories with the same name as the section the child categories belong to, you can do this:

<txp:category_list parent='<txp:section />' exclude='<txp:section />'>
<txp:if_different><txp:category title="1" wraptag="h4" /></txp:if_different>
etcetera...

Offline

#3 2011-12-20 08:24:02

Gallex
Member
Registered: 2006-10-08
Posts: 1,315

Re: section specific category list

brilliant! thank you els!

Offline

Board footer

Powered by FluxBB