Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2011-06-09 09:40:51
- Gallex
- Member
- Registered: 2006-10-08
- Posts: 1,315
active menu link
i use this code for outputting menu:
<txp:section_list break="" default_title="Home" include_default="1" sections="news,contact" wraptag="ul">
<li<txp:if_section name='<txp:section />'> class="active"</txp:if_section>><txp:section link="1" title="1" /></li>
</txp:section_list>
that way the active class is added to the list item only in a section page not in an individual article page.
how to get it into individual article page too?
Offline
#2 2011-06-09 13:03:34
- Gallex
- Member
- Registered: 2006-10-08
- Posts: 1,315
Re: active menu link
correction:
class active is added in an individual article pages in any section beside frontpage
sorry-sorry
Offline
Re: active menu link
I think you’ll need to create a sticky article for each section and make sure it reads that with the following code…
<txp:if_article_list>
<txp:article status="sticky" form="navigation" />
<txp:else />
<txp:output_form form="navigation" />
</txp:if_article_list>
…and put your navigation code in a form. That’s because a section landing is not an individual article.
Offline
Pages: 1