View Single Post
  #10 (permalink)  
Old Feb 2nd, 2008, 16:48
Oak's Avatar
Oak Oak is offline
SuperMember

SuperMember
Join Date: Dec 2007
Location: London
Age: 35
Posts: 289
Thanks: 6
Thanked 0 Times in 0 Posts
Re: highlight current page

It seems very simple, I copied and pasted your example in to my page:
Code: Select all
<ul>
<li<?php if ($page == 'home') { echo ' id="active"'; }?>><a href="/">Home</a></li>
<li<?php if ($page == 'classes') { echo ' id="active"'; }?>><a href="#" rel="dropmenu1">Classes</a></li>
<li<?php if ($page == 'events') { echo ' id="active"'; }?>><a href="capoeira-events-up-coming.php">Events</a></li>
<li<?php if ($page == 'contat') { echo ' id="active"'; }?>><a href="capoeira-school-contact.php">Contact</a></li>
<li<?php if ($page == 'teacher') { echo ' id="active"'; }?>><a href="capoeira-school-risadinha.php">The Teacher</a></li>
<li<?php if ($page == 'images') { echo ' id="active"'; }?>><a href="capoeira-school-images.php">Images</a></li>
<li<?php if ($page == 'faq') { echo ' id="active"'; }?>><a href="#" rel="dropmenu2">Capoeira FAQs</a></li>
</ul>
but if you take a look at the screen shot it's a bit messed up?

<?php $page = 'home'; ?> was also added bellow the html tag
Attached Images
File Type: jpg scshot-nav.jpg (27.5 KB, 6 views)

Last edited by Oak; Feb 2nd, 2008 at 16:52.
Reply With Quote