I was trying to use Mark Huot’s Pages — Nested Menu plugin for a menu on a site. I’m trying to set it up so that the child pages are shown only if you are somewhere within the parent page (or child pages of that parent). I have tried everything from PHP to doing a conditional embed with another version of the plugin (seems the plugin can only be run a total of once even if the other one is in an embedded template).
I have figured out an easy way to achieve this now, but it requires an id for the child <ul>. Would it be possible for someone to help with a small modification to the plugin to insert the parent’s URL segment as an id in the <ul> element of the child menu?
So for a simple menu like this: dogs beagles pugs poodles cats siamese fluffy calico
The child menu for dogs would have a <ul id=”dogs”>, and the child menu for cats would have a <ul id=”cats”>.
I have tracked down in the code where the child <ul>’s get created, I just don’t know how to access the parent URL segment. The line number is 343, and the code on that line is:
$this->return_data .= '<ul>';
Could anyone please help me?
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.