The simpliest method to accomplish this is to just make a <txp_page /> for each section. I don’t have that many sections.. seems easy enough, but what if I want to add a new section? Again … I will problem not have a plethora of sections… so that also seems doable
but, part of being a programmer … is that you devise all these methods that may take more time than just copying and pasting … but the aim is to be easier to maintain.
I only have three <txp_page's />, and i really didn’t want to make a new one for each section, so first things was first … make a MISC form … site-nav ... and put the nav in each of those txp_pages… using <txp:output_form form="site-nav" /> … so now i can make changes to my nav one place, and not worry about it…
That’s pretty straightforward, then with some css voodoo on the ul/li … i replaced the text with images … and voila I have a vertical nav …
Now the tricky part … it’s not really that tricky … it’s just to make me feel good. When i go to each section I want it to be highlighted… again i want to avoid duplication… so i added one change to the form… added an id to the UL that is the current section.
<ul class="nav"> changed to ...
<ul class="nav" id="ul-<txp:section />">
So now … i know where i am … so in my style sheet i just add a line for each section…
ul#ul-photos li#li-photos a { ... }
etc.
So this basically translates to … IF there is a UL whose ID=UL-PHOTOS then an LI whose ID=LI-PHOTOS then turn me on … So if I were in the technology section , the UL ID=UL-TECHNOLOGY, so the photo nav would not turn on.
So when I add a new section, via textpattern, i just add the necessary lines in the css, and change the one form … ahh simple enough …
Hopefully someone find this useful…