active class for custom navigation
Posted: Tue Aug 11, 2009 3:36 pm
Hello there,
I've just installed CMSMS for the first time and am enjoying using it so far.
I had already built my site with HTML/CSS, so have been making it all dynamic and marvellous. I had a little problem when it came to the menu, so I just hardcoded the links in. Not really a big issue. This is though, seeing as I only have one navigation, I can't use an active class on my navigation.
I tried to set up a little PHP script to sort this (as a UDT) but it wasn't working.
I tried something like:
if ({sitename} == 'home') echo 'class="home"';
but no joy.
Any ideas how I can do this?
I've just installed CMSMS for the first time and am enjoying using it so far.
I had already built my site with HTML/CSS, so have been making it all dynamic and marvellous. I had a little problem when it came to the menu, so I just hardcoded the links in. Not really a big issue. This is though, seeing as I only have one navigation, I can't use an active class on my navigation.
I tried to set up a little PHP script to sort this (as a UDT) but it wasn't working.
I tried something like:
if ({sitename} == 'home') echo 'class="home"';
but no joy.
Any ideas how I can do this?