is it possible to add a class to a single point of a menu to style it differently

14 views
Skip to first unread message

bernhard...@gmail.com

unread,
Feb 10, 2016, 4:11:25 AM2/10/16
to Hippo Community
hi there.

I want to style only one menupoint.
Is it possible to set a different color to a single menupoint? All other points need to stay unchanged.

thanks.
regards Bernhard

Minos Chatzidakis

unread,
Feb 10, 2016, 5:51:42 AM2/10/16
to Hippo Community
Hi Bernhard,

On Wed, Feb 10, 2016 at 9:59 AM, <bernhard...@gmail.com> wrote:
hi there.

I want to style only one menupoint.

What is a menupoint? Is it a menu item?
 
Is it possible to set a different color to a single menupoint? All other points need to stay unchanged.

How about a CSS selector matching that particular item? You can match the item by name, though doing this feels kinda hardcoded.

In Hippo 10.2 you can also add custom parameters to your sitemenu items, see http://www.onehippo.org/library/concepts/hst-configuration-model/sitemenu-configuration.html under "Configuration Parameters". You'd need to provide your own freemarker template for the menus (you can start by copying the one that comes with Essentials) to use those parameters. 
For instance, you could add a parameter named "color" which you use in your ftl to decide what color a menu item should have. This approach is preferable since you don't need to hardcode names of menuitems in your CSS.

hth,
Minos
--
 

thanks.
regards Bernhard

--
Hippo Community Group: The place for all discussions and announcements about Hippo CMS (and HST, repository etc. etc.)
 
To post to this group, send email to hippo-c...@googlegroups.com
RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-communi...@googlegroups.com.
Visit this group at https://groups.google.com/group/hippo-community.
For more options, visit https://groups.google.com/d/optout.



--

Amsterdam - Oosteinde 11, 1017 WT Amsterdam
Boston - Inc. 71 Summer Street, 2nd Floor, MA 02110

Reply all
Reply to author
Forward
0 new messages