Plugin Author
wizzud
(@wizzud)
Under the Fallbacks section, try setting the Try items marked as Parent of Current checkbox
Thread Starter
Jack
(@moxie)
Perfect! Thanks very much. I even got the current category highlighted 🙂 The only thing that I can’t get right is that it would be even better of Actueel in the main menu was in ‘active’ state, but that is too complicated I guess. But a great plugin you have here! Very complex sometimes, but does a great job 🙂
Thread Starter
Jack
(@moxie)
I’m noticing one more thing on this page: http://www.denormaalstezaak.nl/category/agenda/
While all the menu items on the left link to category pages, clicking on a single post item will result in the left menu disappearing for items in the Agenda category, while the rest still shows that custom menu. I tested it by moving Nieuws to be the first sub-item, but it is still only the posts within the Agenda category that are causing the problem. I looked at posts within the Nieuws or Agenda category, and they are only added to one single category.
Plugin Author
wizzud
(@wizzud)
Sorry, took me a while to spot it…
It’s because the Actueel menu item, like its Agenda sub-item, is also a category link to the agenda category, and as such it is being picked up (by CMW) as the being the first instance of a possible parent post (when there’s no current menu item). If you display a single Agenda item and look at the classes (in the main nav) of both the Actueel LI item and its Agenda LI sub-item and you’ll see what I mean : they both have classes of
current-post-ancestor current-menu-parent current-post-parent
Ok, that explains what is happening, but as to what can be done about it within CMW…
When there’s no current item and CMW has been told to look for a possible parent item, it uses the 1st instance it finds (Actueel, in this case). It can only use one, and opting for the first one seemed reasonable … but maybe it should use the last it finds instead? That would solve your problem, but is it also reasonable when there are multiple candidates at the same level? Sorry, I know it doesn’t help you immediately, but I need to give the entire “first-found” philosophy some careful thought…
Thread Starter
Jack
(@moxie)
Thanks for elaborating on this. I think I understand.
Perhaps this is also the reason why another submenu is not appearing, in this case a category beneath a category link?
View post on imgur.com
The first category is showing up fine, so is the submenu of ‘Samen aan de slag’, but the submenu of ‘Verhalen uit de praktijk’ is not appearing:
http://i.imgur.com/e4i5Qss.png
This iss the page: http://www.denormaalstezaak.nl/dnz-partners/samen-aan-de-slag/
Plugin Author
wizzud
(@wizzud)
Hmmm … not really.
The difference here is that the Samen… item is a page item and the Verhalen… item is a category item, and your CSS is making a distinction between the 2 as to which one should have an open sub-menu : page items that are current (or a parent of) will show sub-menus, whereas category items that are current will not (compare the classes on each of the items and look at the rule applied when Samen… has either current_page_item or current-page-parent class).
Thread Starter
Jack
(@moxie)
You are absolutely right. I didn’t think of that, but I got is solved. Thanks for pointing out the missing css to me 🙂