Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #24942

    hi i like to change the displayed pages on th default page sidebar.

    normally all the pages in one level are listed including their childs.

    i like to only show the current page with all of the childs.

    i am pretty sur this can be easily done by putting something in between line 33 til 55 in the sidebar.php

    best regards#thomas

    #125250

    for example at it-findik.net/service-consulting it should show only the child pages:

    Planung & Beratung

    Hardware-Vertrieb & Einkauf

    IT-Service

    Fernwartung & Vor-Ort-Service

    i managed this by deleting line 39 – 44 of the sidebar.php but if you click on a child page the navigation in the sidebar gets lost all the time.

    so far

    thomas

    #125251

    The only quick solution would be to hide the other pages with css. You can hide all links with

    .sidebar .widget_nav_menu .page_item{
    display: none;
    }

    Then use following code to display the current page (and it’s ancestors or children)

    .sidebar .widget_nav_menu .current_page_parent.page_item, .sidebar .widget_nav_menu .current_page_item.page_item{
    display: block;
    }

    #125252

    hmmm, this does not work on my side.

    at the parent page, the current parent is displayed.

    at the the child page, nothing is displayed.

    maybe we need a longer solution ;-)

    regards

    thomas

    #125253

    Hey!

    Did you revert the changes in sidebar.php?

    Regards,

    Peter

    #125254

    yes

    #125255

    Hey!

    I think I found the problem and corrected the css code above. There was a redundant space between .current_page_parent and .page_item

    Regards,

    Peter

    #125256

    hey peter,

    i checked for myself and found a great solution:

    ul.children {display: none;}
    .current_page_item ul.children,
    .current_page_parent ul.children {display: block;}

    works great and is more clear for the viewer.

    best regards

    thomas

    #125257

    Hi!

    Glad you found a solution. However I think it’s too simple – it maybe affects the main menu at the top – thus I’d include some selectors to be on the safe side.

    Regards,

    Peter

Viewing 9 posts - 1 through 9 (of 9 total)

The topic ‘change level of sidebar navigation’ is closed to new replies.