Page 1 of 1

[solved] Exact definitions of some menu_manager variables

Posted: Mon Nov 11, 2013 2:16 pm
by dlen
Hello!

Is there somewhere a concise and precise definition of the following variables of the menu_manager module, or could someone of you give it:

current ( the lowest node in the menu path? )
parent ( difference to 'haschildren' ? )
children_exist ( difference to 'parent' ? )

Somewhere I got

has_children

which is deprecated, is it?

Thanks very much.

Re: Exact definitions of some menu_manager variables

Posted: Mon Nov 11, 2013 2:21 pm
by Jo Morg
I would assume that a menu is a representation of a tree with nodes, so that:
- Current is the current active node/page;
- parent: if is not on the root then it has to have a parent, so this is it;
- haschildren: well... it has to be TRUE if the current node does have children...

Re: Exact definitions of some menu_manager variables

Posted: Mon Nov 11, 2013 5:11 pm
by dlen
Thanks for your thoughts.

The problem is,

"current" could be defined as true when the link belongs to the open page - or when the link belongs to the open page AND the page has no children (Though probably is not - but I want to get away from this "probably"- thing.)

"parent" could be defined as true, when it has children at all - or when it has children and the open page is one of them.

"children_exist" should be clear, but again there is this "should".

More generally, I'd like to suggest to module writers to document not only the parameters, but also the available variables in the module documentation.

Re: Exact definitions of some menu_manager variables

Posted: Mon Nov 11, 2013 5:30 pm
by Jo Morg
dlen wrote:"parent" could be defined as true, when it has children at all - or when it has children and the open page is one of them.
Actually I wasn't clear on my answer, parent holds (I think) the id of the parent and not if current is parent as that would not make sense. However keep in mind that any non 0/null/empty variable is considered as being true on a {if $var} type of test, hence the other tests possible (isset() for instance).
I have to admit I'm not that experienced with menu manager but test what is available on each var with {$var|print_r} on each case. It's an invaluable tool for this.

Re: Exact definitions of some menu_manager variables

Posted: Tue Nov 19, 2013 7:35 pm
by Dr.CSS
Have you read Menu Managers Help page..?

Re: Exact definitions of some menu_manager variables

Posted: Tue Nov 19, 2013 10:29 pm
by dlen
I must have been blind.

Re: Exact definitions of some menu_manager variables

Posted: Sat Dec 28, 2013 7:29 pm
by Dr.CSS