Show children and grandchildren of current parent

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
ottoreck
New Member
New Member
Posts: 6
Joined: Mon May 28, 2012 6:04 pm

Show children and grandchildren of current parent

Post by ottoreck »

Hi. I'm running CMS Made Simple 1.10.3. I'm using PHP 5.3.2, and MySQL 5.1.44. This is all working with Apache 2.0.63 running on Linux.

I'm new to CMSMS and Smarty, but long time WordPress dev and trying to update a site for customer.

I'm sure this has been asked many times, but i can't seem to find the answer searching the internets.

I have a left navigation were I only want to so show the children and grandchildren when i'm on the parent. I'm using the following in my template: {menu start_level="2" number_of_levels="3" collapse="1"}

so structure like:
  • Main
    • - One
    • - Two
      • + Child
        • > GrandChild
    • - Three
    • - Four
When i'm on "Two", "Child" or "GrandChild", I want the full list of children to appear for "Two". But of course when on "Three" or "One", Two's children and grandchildren would not be displayed.

The above tag using collapse="1" works, for children but it doesn't display grand children when on "Two". Thus when i'm on "Two" it only shows me the Child. The grand child won't show until i'm on the Child or grandchild.

???
Thanks
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Show children and grandchildren of current parent

Post by Dr.CSS »

Have you tried collapse='2'?...
ottoreck
New Member
New Member
Posts: 6
Joined: Mon May 28, 2012 6:04 pm

Re: Show children and grandchildren of current parent

Post by ottoreck »

no collapse="2" gives me all the children of all the parents. Essentially the same as not have collapse at all in the tag.

so that gives me the children of "one" and of "two" regardless of what page i'm on

I think collapse="2" is the same as collapse="0" or false
ottoreck
New Member
New Member
Posts: 6
Joined: Mon May 28, 2012 6:04 pm

Re: Show children and grandchildren of current parent

Post by ottoreck »

that doesn't seem to work as it just treats it as collapse false and then shows all the children of all the parents
ottoreck
New Member
New Member
Posts: 6
Joined: Mon May 28, 2012 6:04 pm

Re: Show children and grandchildren of current parent

Post by ottoreck »

collapse=2 doesn't seem to work. I looks like the only values are essentially true or false and collapse=2 is teh same as collapse=0

it essentially just shows all the children of all the sections as apposed to two levels of the current child.
Post Reply

Return to “CMSMS Core”