Published by Mijingo

tips icon image

EE Insider Tips
Sponsored by Mijingo's EE 2 Screencasts

ExpressionEngine mini-howtos created by the EE Insider community.

Current Navigation Highlighting

User's avatar
  • Posted by Jonathan Longnecker
  • May 29, 2009
  • 1 person has found this tip helpful.

An easy way to embed your navigation so it can be reused but pass the “current” class so it highlights for the page you’re on:

<ul>
   <
li><a  
   href
="./">Home</a></li>
   <
li><a  
   href
="dont_hire/">Don’t Hire Us</a></li>
   <
li><a  
   href
="portfolio/">Portfolio</a></li>
</
ul

Then when you embed the navigation you just use the “loc” parameter to tell it which section to highlight:

 

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).

Search EE Insider Tips
Sponsored By