Keep parent active and get active state in submenus

MissyW

Thanks, sky writer!  Have just pm'd you the source.

And would you believe - one of my problems is fixed, much to my surprise. Aye yai yai - The parent menu item is now correctly remaining active when I click on a subpage!   I can only guess that when I added a line of code to the css yesterday:
.nav2 li.menu-parent a {... etc.
it did not show up in testing maybe because I didn't clean my browser cache.  Yet other changes to the css took effect immediately and did not require clearing of the cache. Sigh!

But I still have the other problem of not being able to get active state to work in the submenu.


MissyW

Hi sky writer
Thanks for offering to help!!  Sorry, but I don't understand what you need ...
Quote from: sky writer on September 04, 2011, 03:23:20 AM
If you PM me the significant source code for the pages in each state, I will take a whack at this.
- When you say you want the 'significant source code for the pages in each state', do you mean I should activate a parent menu, click on 'view source' from my browser, and take a copy of the relevant source for you?  Then do the same for a sub-menu?  Or do you want a copy of index.php and the css file??

sky writer

If you PM me the significant source code for the pages in each state, I will take a whack at this.

MissyW

I need help to be able to get the "active" state working in my submenus in a Multiflex-3 template.   I have spent hours studying forum postings, reading the sub_menu2 documentation (which is largely beyond my grasp), and trying a hundred different combinations of css settings and sub_menu2 calls based on guess-work.  But alas, it still escapes me!! Big big sigh.

In my menu structure, I have root navigation across the top with sub-navigation down the left side. When you click on one of the parent menu items in the root navigation, then the sub-navigation menu displays on the left, and the parent which you just clicked is highlighted as active.  So far, so good.

My problem is, if I click on one of the sub pages (either from the pulldown menu or from the sub-menu), then :-
(1) the "active" state in the root navigation disappears
(2) and I cannot get the active state to EVER work in the sub-menu.

Is there a way to :-
(1) get the active state working in the Multiflex-3 sub-menu which uses the dd/dl construction
(2) and also to keep the parent menu item in the active state when one of the children is clicked?

Here is the code I am using for the sub-menu in index.php:

<!-- Navigation with bullets -->
        <dl class="nav3-nobullet">
          <?php show_menu2(1SM2_CURR+1SM2_ALLSM2_ALL,'[if(level>0){<dd>}][if(level==0){<dt>}][a][menu_title]</a>[if(level>0){</dd>}][if(level==0){</dt>}]');?>
        </dl>



and here is the css code for the sub-menu in layout_text.css:

.nav3-nobullet {width:170px; margin:10px 0 0 20px;}
.nav3-nobullet {width:199px; margin:10px 0 0 0px;}
.nav3-nobullet dt a, .nav3-nobullet dt a:visited {line-height:2.0em; text-decoration:none; color:rgb(70,122,167); font-weight:bold; font-size:110%;}
.nav3-nobullet dd a, .nav3-nobullet dd a:visited {line-height:1.7em; margin:0 0 0 15px; text-decoration:none; color:rgb(70,122,167); font-weight:normal; font-size:110%;}
.nav3-nobullet dt a:hover, .nav3-nobullet dd a:hover {text-decoration:underline; color:rgb(42,90,138);}


I haven't yet ported this website to a host server so I cannot give you a link as yet, and I am hoping someone can help me from the above information.  But if you really need to view the site to be able to help me, please let me know and I'll setup a test copy somewhere.