Add a class to a page
It would be nice to be able to add a class to the body tag of a page and also have that class be added to the menu item in the navigation.
Such as having the option when creating the page and not having to add JQuery to do it. Especially for the navigation (because the text or position of the item may change)
So for instance if you want to highlight a particular page in the navigation, if it had a class assigned to it, you could style it differntly than the rest....
Thanks.
Hi Laura,
Actually, if you're using a master page as template for your pages, you can set a css class to the body of the page. However, I would recommend you to use the sfPublicWrapper class when setting css styles to the page, since the div with this class actually holds the whole content of the page.
I'm not sure I understand your second requirement:
Such as having the option when creating the page and not having to add JQuery to do it. Especially for the navigation (because the text or position of the item may change).
Could you please elaborate a bit on it?
As for the class, which should be set to the navigation item, when particular page is opened - this feature is offered out-of-the-box. Depending on the type of navigation control you're using, it varies between rtsSelected and rmSelected (when the navigation is based on RadTabStrip and RadMenu respectively).