Hi I’m pretty sure this has been covered I just can’t seem to find it in the forum. How can you use embed conditionals to give the current page list item a class of current?
i.e.
<ul id="nav">
{exp:weblog:entries weblog="home" limit="1"}
<li class="current"><a href="#">{title}</a></li>
{/exp:weblog:entries}
</ul>
or even in a static list… I was just going to use if statements like shown I just wondered if there was a better way.
<ul id="nav">
<li {if segment_1 == "home"}class="current"{/if}><a href="#">Brief Us Now</a></li>
<li {if segment_1 == "advertise"}class="current"{/if}><a href="advertise.htm">I'd Like to <span>Advertise</span></a></li>
<li {if segment_1 == "alreadyadvertising"}class="current"{/if}><a href="#">I'm Already <span>Advertising</span></a></li>
<li {if segment_1 == "interested"}class="current"{/if}><a href="#">I'm Interested in <span>Radio Ads</span></a></li>
<li {if segment_1 == "showreels"}class="current"{/if}><a href="#">Showreels</a></li>
<li {if segment_1 == "team"}class="current last"{/if} class="last"><a href="#">Team Members</a></li>
</ul>
Thanks
