Something like nav-selected for Parent page (to highlight parent while on child page?)

Permalink
I have the typical situation where there's a main top navigation and a left side navigation on subsections of the site. The top menu has nav-selected applied and the left menu also has nav-selected applied.

The problem is, when I am in Section -> Subsection A, I would like both menus to indicate that they are selected.

Is there a way to do that?

Screenshot attached if my explanation was difficult to follow.

1 Attachment

 
zoinks replied on at Permalink Reply
Found the solution by combing the forums...

COO-OOL!

For me and other n00bs, here is an elaborate explanation of what Marv said inhttp://www.concrete5.org/index.php?cID=7503...

1. Duplicate the autonav folder from concrete/blocks and copy it into root/blocks.

2. In root/blocks/autonav, change the duped view.php to as follows (copy and paste the entire code below, just replace everything)...
<?php 
   defined('C5_EXECUTE') or die(_("Access Denied."));
   $aBlocks = $controller->generateNav();
   $c = Page::getCurrentPage();
   echo("<ul class=\"nav\">");
   $nh = Loader::helper('navigation');
   //this will create an array of parent cIDs 
   $inspectC=$c;
   $selectedPathCIDs=array( $inspectC->getCollectionID() );
   $parentCIDnotZero=true;   
   while($parentCIDnotZero){
      $cParentID=$inspectC->cParentID;
      if(!intval($cParentID)){
         $parentCIDnotZero=false;
      }else{
cgrauer replied on at Permalink Reply
cgrauer
In your stylsheet just use the class ".nav-path-selected" instead of nav-selected
zoinks replied on at Permalink Reply
Even easier, but is that a new addition in Concrete 5.4? I didn't see it mentioned on any of the other posts on this forum about this subject.

I'm using 5.3.3 and don't plan on upgrading anytime soon because I see a lot of people's sites have broken and I'm just learning, the majority of info you can find on C5 applies to older versions, etc. so I don't need that kind of headache.