active class for custom navigation

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
doodleflip
Forum Members
Forum Members
Posts: 16
Joined: Tue Aug 11, 2009 3:26 pm

active class for custom navigation

Post by doodleflip »

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?
viebig

Re: active class for custom navigation

Post by viebig »

Your are trying to redesign the wheel!

you can´t use smarty tags along with php code. You should try to learn the menu manager customization, with im simple and easy.

You can access smarty properties with PHP, just take a look and the gCms object(google it)

Regards

G
Post Reply

Return to “Layout and Design (CSS & HTML)”