Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2009-11-22 13:47:41
- leafy_loader
- Member
- Registered: 2008-09-25
- Posts: 96
active_class in section_list not working
I have the following in my page
<txp:section_list include_default=“1” break=”“ active_class=“current” form=“main_nav” />
the idea is to output the main_navigation based on sections and with drop downs consisting of categories. That part works just fine but the active_class part of it doesn’t work. The code in the form it calls is as follows;<li <txp:if_section name=”<txp:section />”>class=“current”</txp:if_section>><txp:section link=“1” title=“1” />
<txp:category_list children=“0” wraptag=“ul” section=”<txp:section title=“0” />” break=“li” parent=”<txp:section title=“0” />” exclude=’<txp:section title=“0” />’ />
</li>
Any ideas?
Offline
#2 2009-11-22 15:33:11
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: active_class in section_list not working
active_class
in <txp:section_list>
or <txp:category_list>
doesn’t work if the container tag, or the single tag with the form
attribute, is used. Textbook shows an example how to set the active class in those cases.
Offline
#3 2009-11-22 16:56:31
- leafy_loader
- Member
- Registered: 2008-09-25
- Posts: 96
Re: active_class in section_list not working
Thank you
Offline
#4 2009-11-23 14:16:48
- Gallex
- Member
- Registered: 2006-10-08
- Posts: 1,308
Re: active_class in section_list not working
if you get it work, could you provide an exact code and the homepage you using it?
Offline
#5 2009-11-23 14:54:11
- leafy_loader
- Member
- Registered: 2008-09-25
- Posts: 96
Re: active_class in section_list not working
Here’s what I’m using in a form called ‘main_nav’ ;
<txp:section_list break=”“ include_default=“1” default_title=“Home”>
<li<txp:if_section name=’<txp:section />’> class=“current”</txp:if_section>><txp:section link=“1” title=“1” />
<txp:category_list children=“0” wraptag=“ul” section=”<txp:section title=“0” />” break=“li” parent=”<txp:section title=“0” />” exclude=’<txp:section title=“0” />’ />
</li>
</txp:section_list>
It’s being called by <txp:output_form form=“main_nav” />
Works fine, unfortunately it’s on my local pc so I don’t have a live link for you
Offline