How can I 'un-active' header if certain criteria meets? #44
-
|
I have header menu defined in
But, actual file structure is like this: This menu and actual file structure unmatch is intended. Many Hugo theme including HB Theme (Sorry, I forgot what theme I'm currently using is now called as) doesn't support nested child menu like [Game - Genshin Impact - Misc]. This is only way to show child menu of 'Genshin Impact' to header, by defining 'Genshin Impact' child menu as parent menu in But in this layout, both 'Game' and 'Genshin Impact' header menu is set as I want to 'un-active' 'Game' menu if 'Genshin Impact' menu is also active. But I don't know what file to modify for this. Sorry if this question looks like asking for spoon-feeding. I've completely lost my way of how to modify things to achieve my goal. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Create file
I haven't test, tweak it to suit your needs. |
Beta Was this translation helpful? Give feedback.


Create file
layouts/partials/hb/modules/header/functions/is-current.htmlon your site with the same content, and remove line3-12.https://github.com/hbstack/header/blob/e2c6b84705526ba39fbe7ba16b057672b59a372c/layouts/partials/hb/modules/header/functions/is-current.html#L3-L12
I haven't test, tweak it to suit your needs.