variable issue
Permalink
Hi, I'm making a custom template for the auto-nav block for a site. It's pretty simple, based on the Header Nav template, but I need to add a uniques class name in the <a href..> tag, the class name should be the name of the page.
For instance, if the page was titled 'About Us', then the name of the page in the navigation would be 'about_us'. I want to be able to put htat class name in the <a> tag, so it would be something like <a class="about_us" href="/concrete5/about_us">About Us</a>.
I realize how to get the title; $ni->getName(), is there a simple function to get the filename name too?
Reason for the unique classes; graphical sprite based side menu, so if you have a better idea I'm all for it (other than hard coding, I need the active page indicated too).
For instance, if the page was titled 'About Us', then the name of the page in the navigation would be 'about_us'. I want to be able to put htat class name in the <a> tag, so it would be something like <a class="about_us" href="/concrete5/about_us">About Us</a>.
I realize how to get the title; $ni->getName(), is there a simple function to get the filename name too?
Reason for the unique classes; graphical sprite based side menu, so if you have a better idea I'm all for it (other than hard coding, I need the active page indicated too).
By default, the standard template already gives you a class for the active link. Check out the if statement:
hth
Jon