I’m sure he knows a lot, but I don’t think you quite understand what I’m saying.
I’m not worried about the second menu right now. I’m just focusing on the main menu. This is what I’m trying to do. Let’s say I have two main menu items. One is Home, and the second is About Us. Home has no children. About Us has two children, Mission and Location. I am using Ultimate Parent with About Us so it automatically goes to Mission. Now, I always want the active main menu item to have a certain template, NavigationListItemThis. This code for Wayfinder call for the main menu makes Home have this template when Home is the current page:
&hereTpl=`NavigationListItemThis`
However, let’s say I go to the Location page. Now Location is the current page, but About Us is the active main menu item. I want About Us to get the NavigationListItemThis template. The previous code obviously won’t take care of that because About Us is not the current page, but one of it’s children are. So to achieve the same result, I attempt to use this code:
&activeParentRowTpl=`NavigationListItemThis`
About Us is the activate parent, but it is not the current page itself, so this could presumably would assign the template. However, it’s not.
After looking at Wayfinder’s PHP code like I described in my last post, I figured out that the reason activeParentRowTpl isn’t working is because the level of the About Us page (1) is not less than the level I specified in my Wayfinder call (1); they are equal. The Wayfinder elseif statement only evaluates as true is the level is less than the level parameter. I assume this is to prevent the bottommost child in a menu from receiving the template from activeParentRowTpl, but in my case all of the menu items are both the parent and the bottommost child because I only have one level of menu items, so the About Us item is not getting the template specified with activeParentRowTpl. Modifying the Wayfinder code makes this work, but obviously that’s not an optimal way to fix the problem because there will be other cases where I don’t want that to happen as it is sort of an exception to the normal behavior of Wayfinder. Understand what I mean?
I’m not saying kongondo is wrong, but he misunderstood what I was trying to do. He suggested using &hereClass differently for each menu, but &hereClass has nothing to do with what I’m trying to accomplish. And the reason I said I can’t use a class for the active menu item is because if you look at my template chunks for the active item, I am using span tags to show the text, whereas the rest of the menu items that are not active are links with the a tag. If I was to simply use a class to specify the active item, it would still be a link. I do not want my active items to be links; I want them to be plan text wrapped in span tags.
I hope this has made my situation more clear. I’m not trying to do anything with the submenu at this point; I’m trying to get the active main menu items to get the right template when one of their children is active, even though the children are on a completely separate menu with a separate Wayfinder call.