[PHP] help with setting menu styles with PHP
am trying to accomplish something utlizing PHP. What I have is a menu marked up as such: div id=navcontainer ul id=navlist li id=activea href=About_Me.php title=you know you want to learn more about me id=currentAbout Me/a/li lia href=Skillset.php title=I've got skillzSkill set/a/li lia href=Hireme.php title=I can do wonders for your web presenceHire Me/a/li lia href=Portfolio.php title=web sites, graphics, newslettersPortfolio/a/li lia href=Contact.php title=how to get in touch with meContact/a/li lia href=Resume.php title=my beautiful resumeReacute;sumeacute;/a/li lia href= http://inspiredevolution.blogs.com/inspiredevolutioncom/; title=the blog for Inspired-Evolution.com Blog/a/li li class=lasta href=RSS.php title=Syndication that is really simple RSS/a/li /ul /div and then I have everything styled nicely with CSS to give you the menu you see here: http://www.inspired-evolution.com/About_Me.php What I want to do next is to change the menu from being hard coded on all of my pages to being an include making the menu more manageable. The stumbling block is I want to be able to keep the CSS functionality where you have the active indicator which has different CSS for the link of the page you are on. I have seen this done with PHP before with something like IF on active page use this style ELSE use this style. Can any PHP gurus assist me in coding something like this? I don't believe it is too difficult, but beyond by scope right at the moment.
Re: [PHP] help with setting menu styles with PHP
http://www.inspired-evolution.com/About_Me.php What I want to do next is to change the menu from being hard coded on all of my pages to being an include making the menu more manageable. The stumbling block is I want to be able to keep the CSS functionality where you have the active indicator which has different CSS for the link of the page you are on. I have seen this done with PHP before with something like IF on active page use this style ELSE use this style. Can any PHP gurus assist me in coding something like this? I don't believe it is too difficult, but beyond by scope right at the moment. It's not a php solution, but you can change it to one easy enough. This will give you the idea. http://www.sperling.com/examples/menu_aware/ tedd -- http://sperling.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] help with setting menu styles with PHP
I did something similar on my page. I did a simple comparison in a loop through the menu DOM, foreach ($nodeList as $node){ if ($currentPage eq $nodeHref) { //set class attribute = 'active'; } } On 3/16/06, tedd [EMAIL PROTECTED] wrote: http://www.inspired-evolution.com/About_Me.php What I want to do next is to change the menu from being hard coded on all of my pages to being an include making the menu more manageable. The stumbling block is I want to be able to keep the CSS functionality where you have the active indicator which has different CSS for the link of the page you are on. I have seen this done with PHP before with something like IF on active page use this style ELSE use this style. Can any PHP gurus assist me in coding something like this? I don't believe it is too difficult, but beyond by scope right at the moment. It's not a php solution, but you can change it to one easy enough. This will give you the idea. http://www.sperling.com/examples/menu_aware/ tedd -- http://sperling.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Anthony Ettinger Signature: http://chovy.dyndns.org/hcard.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php