Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #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
    ChangeGroup

    #729333

    Hey 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, 4 months ago by Vinay.
    #729339

    Hi 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
    2015

    Br,
    ChangeGroup

    #730148

    Hi,

    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,
    Ismael

    #741685

    Perfect Thank you!

    #742213

    Hi,

    Glad we could help :-)

    Please let us know if you should need any further help on the topic.

    Best regards,
    Rikard

    #746847

    Hi Rikard,

    Thank you ! I don’t think we have any further questions.

    Br
    ChangeGroup

    #747306

    Hi,

    Ok great, thanks for letting us know. Please open a new thread if you should have any further questions or problems.

    Best regards,
    Rikard

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Highlight parent menu item when page active’ is closed to new replies.