Page is a not externally linkable
coopster - 3:21 pm on Apr 26, 2008 (gmt 0)
In a nutshell what it is doing is comparing the current page URI with linked anchor elements within the page and removing the link and adding an "active link" class to the element in order to let the CSS modify behavior for that element. I have since modified the original PHP function shown in that thread to handle multiple classes and locate href anywhere within the anchor. It works slick. Cut our CSS and CSS maintenance back huge.
You can really cut back the CSS code bloat by not having an id on every <body> element. What I mean is, if the only reason you have an id on the body element is to "match it up" with the navigational anchors to change link status you can remove the id on the <body> element and use a little server-side magic to modify your anchor(s). The concept is started here using PHP [webmasterworld.com], but can easily be adapted to any server-side language.