Active html link
I have a left hand menu system and I would like to highlight in yellow the page a user is currently on. It seems to me a CSS class must be added to the link of the current page. I will need to compare the current page being processed in the XSLT or Velocity script with the link in the menu system to know when to add the custom css class. How would you recommend accomplishing this?. I have attached a picture to illustrate.
-
image.jpg 26.4 KB
Discussions are closed to public comments.
If you need help with Cascade CMS please
start a new discussion.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by Ryan Griffith on 11 Feb, 2016 06:53 PM
Hi,
This is typically accomplished by looking to see if the folder (or page) has the
current
attribute assigned to it. If so, you can apply a specific class to your markup (i.e.<a>
or<li>
tag). The check for the current attribute is as simple as checking for the existence of@current
:Please let me know if you have any questions.
Thanks!
Support Staff 2 Posted by Tim on 26 Feb, 2016 09:58 PM
Hi,
Just wanted to make sure you saw Ryan's comment above. Let us know if you need more help.
Thanks
3 Posted by tdp0001 on 29 Feb, 2016 01:51 PM
All good here.
Thanks,
Tyler
Tim closed this discussion on 29 Feb, 2016 02:35 PM.