Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Excluding children categories from category_list
I’m full of questions today!
I’m using:
<txp:category_list exclude=“Collections”/>
but that still shows me subcategories of “Collections”
is there a way of avoiding it, without having to specify each child category? I’d like the client to be able to manage categories and not have to upldate templates after each addition.
~~~~~~~~~~~~~| monolinea.com | pixilate.com | istockphoto.com/kemie |~~~~~~~~~~~~~
Offline
#2 2008-10-26 14:27:23
- masa
- Member
- From: Asturias, Spain
- Registered: 2005-11-25
- Posts: 1,091
Re: Excluding children categories from category_list
If you render your category list as nested lists you could simply hide all child categories with a css rule like…
ul li ul { display: none }
Offline
#3 2008-10-26 14:59:16
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Excluding children categories from category_list
I’d be surprised if smd_query wouldn’t be able to do that :)
Offline
Re: Excluding children categories from category_list
maybe stw_category_tree can help!
Hum i think it’s not matching your need!
maybe cbs_category_list then, i haven’t tested!
Cheers
Last edited by Dragondz (2008-10-26 15:52:50)
Offline
#5 2008-10-26 16:05:31
- masa
- Member
- From: Asturias, Spain
- Registered: 2005-11-25
- Posts: 1,091
Re: Excluding children categories from category_list
Dragondz wrote:
maybe cbs_category_list then, i haven’t tested!
That should work. If your category structure looked like this:
globalcat
– cat 1
– – subcat 1
– – subcat 2
– – subcat 3
– cat 2
– – subcat 4
– – subcat 5
– – subcat 6
etc.
…you should be able to use <txp:cbs_category_list parent="globalcat" />
since it will only display direct children of a given parent but not grand children.
Offline
Re: Excluding children categories from category_list
I knew there had to be a plugin that did that! :)
thank you!
~~~~~~~~~~~~~| monolinea.com | pixilate.com | istockphoto.com/kemie |~~~~~~~~~~~~~
Offline