websitebuilder101
06-19-2009, 04:08 AM
Hi all-
So I have been dipping into some php and taken the tutorials at http://www.w3schools.com/ which have been helpful. I need some help with coding a php statement. I already searched on the forums so if I missed a similar post please send the link.
What I am looking to do is use php code ( I'm assuming some sort of if statement) to activate the ' class="active" ' on the page it is on. So for an example, I have a menu with the following pages:
Home | Basketball | Baseball | About Us
If someone clicks on the basketball link, I would like the page to load with the same menu (which I've accomplished using php) but with ' class="active" ' engaged (the next thing I am trying to accomplish). What's the easiest way to do this?
I have found this link: http://textpattern.org/tutorials/899/dynamic-sub-menu-with-active-class but it requires you to add and install a plugin. I don't think this is the easiest way to do, but I could be wrong.
Thanks for your help!
So I have been dipping into some php and taken the tutorials at http://www.w3schools.com/ which have been helpful. I need some help with coding a php statement. I already searched on the forums so if I missed a similar post please send the link.
What I am looking to do is use php code ( I'm assuming some sort of if statement) to activate the ' class="active" ' on the page it is on. So for an example, I have a menu with the following pages:
Home | Basketball | Baseball | About Us
If someone clicks on the basketball link, I would like the page to load with the same menu (which I've accomplished using php) but with ' class="active" ' engaged (the next thing I am trying to accomplish). What's the easiest way to do this?
I have found this link: http://textpattern.org/tutorials/899/dynamic-sub-menu-with-active-class but it requires you to add and install a plugin. I don't think this is the easiest way to do, but I could be wrong.
Thanks for your help!