EE Insider Tips
Sponsored by Mijingo's EE 2 Screencasts
ExpressionEngine mini-howtos created by the EE Insider community.
Using URL Segments for Dynamic Navigation
ExpressionEngine allows you to dynamically assign CSS navigation based on arguments passed from the URL segment.
This allows you to use CSS to display the active page based on the URL.
<a href="/about/" class="{if segment_1 == "about"}about about-active{if:else}about{/if}"></a>
This is just one method that you can use to your advantage.
As always there is more than one way/use for everything in ExpressionEngine!
Email
Print
Post to Twitter
Post to Delicious
runaway — 12:23 on 04.03.2010
good but how resolve this:
http://expressionengine.com/forums/viewthread/151359/
????
fc_arny — 21:52 on 08.05.2010
2 runway
U also can use segment_1, segment_2 and etc. For instance, if u have ‘forum’ folder and ‘viewthread’ template group u must in index template get {segment_2} and it will be ‘151359’. In general, if EE can not find template in template group it use index template.
Add Your Comment?
You must have an EE Insider account to post comments on Insider Tips. It's fast, easy and hassle-free.
Sign up now (or login).