Ive got a single collection page that I’m going to use for 2 categories.
Objects / Installations.
I’d like to style the nav depending on the category.
The category is set in the cms using an option field.
Can anyone point me in the right direction?
If the category is ‘object’ then
If the category is ‘installation’ then
I could probably have 2 navs and set conditional visibility, but i thought there may be a neater solution.
Here is my site Read-Only: LINK
(how to share your site Read-Only link)
I would also go with conditional visibility. If you didn’t like a duplicated nav or duplicated nav items, you could also construct the underlines as separate elements from the text, and then show and hide those with cond. visibility.
Or you re-create the navigation on the Projects template within a custom HTML element, and then bring in the category name as a class. You then can use custom CSS to underline depending on which class is applied.
Thanks @spirelli, got a feeling i may have to just duplicate the nav.
How would the custom HTML element apply a style picked up from a category via the CMS?