-
AuthorPosts
-
January 3, 2017 at 11:50 pm #729214
Hi team Enfold,
I’m trying to do two things:
1. I want the menu ‘ChangeGroup’ to highlight as active, when a child-page for the ‘ChangeGroup’ page is active (see private content for page links)
2. I want the same menu ‘ChangeGroup’ to highlight as active, when a submenu and portfolio-posts are active. This was made possible by Josue before, but then the menu-item was a colored-menu-button. So the CSS doesn’t work for the ‘ChangeGroup’ menu item. Please see former topic here: https://kriesi.at/support/topic/style-of-single-menu-button-item-link-to-submenu/
The code Josue suggested, which worked then was:
#top #wrap_all .header_color .av-menu-button-colored > a:hover > .avia-menu-text, #top #wrap_all .header_color .av-menu-button-colored.current-menu-item > a > .avia-menu-text, #top.single-portfolio #wrap_all .header_color .av-menu-button-colored > a > .avia-menu-text { background: black; color: #f3c463 !important; font-style: bold; border-color: black; }
Now we just want the ‘ChangeGroup’ menu-item to highlight regularly as it does, but now also when both the child-page and the submenu (portfolio-items) are active.
Br
ChangeGroupJanuary 4, 2017 at 9:34 am #729333Hey changegroup,
Sorry but the issue is not clear from the previous post but as I understand you want to highlight the parent page when a subpage is visited correct? Please try adding this code to the Quick CSS section under Enfold > General Styling or to your child themes style.css file:
.current-page-ancestor .avia-menu-fx { opacity: 1!important; visibility: visible!important; background-color: #2c4143!important; border-color: #0a2021!important; }
You can also choose the parent for the subpage in the page option on the right side which will by default activate the parent page when a subpage is viewed.
Best regards,
Vinay- This reply was modified 7 years, 11 months ago by Vinay.
January 4, 2017 at 10:06 am #729339Hi Vinay.
Thank you. But I have already selected the parent page for the subpage in the page option on the right side , but that didn’t by default activate the parent page when a subpage is viewed?
The code below helped with regards to question 1:
I changed your code a bit, so that the menu-text is also highlighted:
.current-page-ancestor .avia-menu-fx { opacity: 1!important; visibility: visible!important; border-color: #2c4143!important } .current-page-ancestor .avia-menu-text { color: #2c4143 !important; }
Question 2:
When the single portfolio post are active fx. the 1995 portfolio pagehttp://www.changegroup.dk/portfolio-item/changegroup-etableret-over-et-stykke-med-laks/ the main-menu ‘ChangeGroup’ is not active. I want the submenu 1995 etc. to be connected to the main-menu-item ‘ChangeGroup’.Josue helped with the before, but then the main-menu-item was a menu-button. He used this code:
#top #wrap_all .header_color .av-menu-button-colored > a:hover > .avia-menu-text, #top #wrap_all .header_color .av-menu-button-colored.current-menu-item > a > .avia-menu-text, #top.single-portfolio #wrap_all .header_color .av-menu-button-colored > a > .avia-menu-text { background: black; color: #f3c463 !important; font-style: bold; border-color: black; }
The main-menu-item ‘ChangeGroup’ is not a main-menu-button, but just the default menu-item. So what in the code above do I need to change, so that ‘ChangeGroup’ is highlighted, when the 10 portfolio post and submenu are active:
1995
1997
1999
2001
2006
2007
2008
2010
2014
2015Br,
ChangeGroupJanuary 6, 2017 at 4:57 am #730148Hi,
Thank you for the update. You can try the following code but it will highlight the “ChangeGroup” menu item every time a single portfolio page is viewed.
.single-portfolio #header .av-main-nav #menu-item-7806 a .avia-menu-text { color: red; }
Best regards,
IsmaelFebruary 2, 2017 at 10:30 am #741685Perfect Thank you!
February 3, 2017 at 7:56 am #742213Hi,
Glad we could help :-)
Please let us know if you should need any further help on the topic.
Best regards,
RikardFebruary 14, 2017 at 12:22 pm #746847Hi Rikard,
Thank you ! I don’t think we have any further questions.
Br
ChangeGroupFebruary 15, 2017 at 7:15 am #747306 -
AuthorPosts
- The topic ‘Highlight parent menu item when page active’ is closed to new replies.