need help displaying the next level down from menu root

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
pcaines
New Member
New Member
Posts: 4
Joined: Fri Sep 02, 2011 9:18 pm

need help displaying the next level down from menu root

Post by pcaines »

Hi All i know that {$cgsimple->get_root_alias()} will display the alias of the menu root.

but what i am after is displaying the alias of the next level down.

1 - root use code {$cgsimple->get_root_alias()}

1.1 - how do i display this alias?


I have many menu levels but need a way of always been able to call up the next level down from root.

Any help will be much appreciated i have been trying to solve this for hours
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: need help displaying the next level down from menu root

Post by calguy1000 »

1. Get the root alias
2. Get the children of the root alias
{$cgsimple->get_children($the_root_alias,'children')}
3. Get the first child
{$children[0]}

I didn't look at the docs, the code or test... but this should be close.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Post Reply

Return to “Developers Discussion”