Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
[solved] Variables in TP
Hi Folks,
iam german, so dont hope for great english here ;)
I desiged a new site, and now i wanted to highlight the activ-part of the navigation, so i made a new css class, that makes the look for the menuepoint which is still aktiv.
I want to know, which variable defines the section in txp, when i switch to the “index.php?s=bla” URL-Design, the Request for $_GET[‘s’] works, but when i switch to “section/id/title”-URL Design it doenst work anymore, can anybody tell me which vars work in the background of the modrewrite of TP?
Last edited by grafzahl (2006-07-29 14:30:50)
Offline
Re: [solved] Variables in TP
If you’re just highlighting the navigation, you have two options for primary nav:
- Use a CSS id or class on the body tag
- Use if_section on the nav
1. Body-CSS
<code>
<body id=”<txp:section />”>
<ul>
<li><a href=”/” id=“a1”>Home</a></li>
<li><a href=”/art” id=“a2”>Art</a></li>
</ul>
</code>
<code>
#default #a1,#art #a2 { color: #aaa }
</code>
2. With if_section
<code>
<ul>
<li><a href=”/”<txp:if_section name=”“> class=“active”</txp:if_section>>Home</a></li>
<li><a href=”/art”<txp:if_section name=“art”> class=“active”</txp:if_section>>Art</a></li>
</ul>
</code>
I’ve used both methods before, but I prefer if_section instead, as it’s less CSS.
Also, for multi-level hilighting, try this post.
Last edited by deldindesign (2006-07-28 21:20:11)
Offline
Re: [solved] Variables in TP
Thank you so mutch, i prefered the if_section method, and it works fine. Great forum :)
Offline
Pages: 1