Internet Marketing Business Forum


Internet Marketing Business Forum » MAIN FORUMS » Web Design & Programming » PHP/HTML/CSS menu active segment scripting question?
Web Design & Programming Building websites, coding scripts or developing apps? html, css, javascripts, ajax, php, asp, java, c+, C++ and other geeky info is here.

Reply
 
LinkBack Thread Tools Display Modes
Old 08-03-2009, 06:30 PM   #1 (permalink)
 
Status: Junior Member
Join Date: Aug 2009
Posts: 1
Olly333 is on a distinguished road
Default PHP/HTML/CSS menu active segment scripting question?

i am making my first PHP based template and am having trouble finding a way of adding the "active" class to a menu. It would probably have to be based on the URL as the code is saved as an extra file and then included using <?php include"menu.php";?>
Any ideas very much appreciated
thank lirpa now what would you suggest i put between the <?php if .... ?>
ok. i ended up using
<?php $page = thenameofthepage?>
on each page and
<? if ($page = index) echo 'class="acitve"?> for the home page and
<? if ($page = downloads) echo 'class=?> for the downloads, ect...
Olly333 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Reply
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -4. The time now is 09:20 AM.
Powered by vBulletin® Version 3.7.0 Beta 6
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.


Nav Item BG