[solved] Exact definitions of some menu_manager variables

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
dlen
Forum Members
Forum Members
Posts: 67
Joined: Fri Apr 09, 2010 11:32 pm

[solved] Exact definitions of some menu_manager variables

Post 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.
Last edited by dlen on Sun Dec 29, 2013 1:43 am, edited 2 times in total.
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1809
Joined: Mon Jan 29, 2007 4:47 pm

Re: Exact definitions of some menu_manager variables

Post 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...
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Conduit | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge | Yet another blog about CMSMS
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
dlen
Forum Members
Forum Members
Posts: 67
Joined: Fri Apr 09, 2010 11:32 pm

Re: Exact definitions of some menu_manager variables

Post 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.
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1809
Joined: Mon Jan 29, 2007 4:47 pm

Re: Exact definitions of some menu_manager variables

Post 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.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Conduit | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge | Yet another blog about CMSMS
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12678
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Exact definitions of some menu_manager variables

Post by Dr.CSS »

Have you read Menu Managers Help page..?
Check ver. CMSMS, PHP, server OS, in System Information page.
Default content http://multiintech.com/defaultcontent/
People are Wonderful
Business is Great
Life is Terrific
Ever wonder what happened to the Album module? Well it is alive and well.
http://album.multiintech.com/
Image
dlen
Forum Members
Forum Members
Posts: 67
Joined: Fri Apr 09, 2010 11:32 pm

Re: Exact definitions of some menu_manager variables

Post by dlen »

I must have been blind.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12678
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Exact definitions of some menu_manager variables

Post by Dr.CSS »

Check ver. CMSMS, PHP, server OS, in System Information page.
Default content http://multiintech.com/defaultcontent/
People are Wonderful
Business is Great
Life is Terrific
Ever wonder what happened to the Album module? Well it is alive and well.
http://album.multiintech.com/
Image
Post Reply

Return to “Layout and Design (CSS & HTML)”