Page 1 of 1

how can i show the children in menumanager?

Posted: Tue May 21, 2013 7:41 am
by piphansdk
HELLO :)

I am trying to make a menu for my website, and at the moment i only need to know, how i can print the subpages on <div id="menulist">

i am trying to do so, by setting if depth==2
but i cant due to the if depth==1.... any ideas?

Code: Select all

{if $count > 0}
<div id="menubarouter">
<div id="menubar">
{foreach from=$nodelist item=node}
{if $node->haschildren}
<div class="slidedown" id="qc1">
 <div class="slidetopic">
{$node->menutext}
{$underside=true}
<span style="color: #FFA500">&#9660;</span>
 <div class="list" id="a1">
 <div id="menulist">

<!-- this is where i am trying to print depth 2 -->

{if $node->depth==2}
<li>{$node->menutext}</li>
{/if}


</div>
<hr class="qc1">
 </div>
<hr class="qc1">
 </div>
 </div>
{/if}
{/foreach}
</div>
</div>
{/if}

Re: how can i show the children in menumanager?

Posted: Tue May 21, 2013 9:45 am
by staartmees
You can find the solution in the Module Help of the MenuManager.

childrenof="" - This option will have the menu only display items that are descendants of the selected page id or alias. i.e: {menu childrenof=$page_alias} will only display the children of the current page.

Re: how can i show the children in menumanager?

Posted: Tue May 28, 2013 12:38 pm
by piphansdk
hello.

thanks for the reply, but i think you misunderstood, the problem is, that i am trying to make the menumanager template, and and it should be builded as i am trying to... i have at the moment used too much time trying to find out, how to make the f****ing menu, but i have no clue :(
if i could code everything in php i think i could so, but i cannot understand the menumanager language :(

so please help me :s
i am trying to:

Code: Select all

{foreach $node->parent}
<div class="slidedown"> 
<div class="slidetopic">
{name of parent}
</div>
<div class="list">
<div class="menulist">
<li>{children of parent}</li>
</div>
</div>
</div>
{/foreach}
and it should generate the 3 menus, as i have 3 parents

Re: how can i show the children in menumanager?

Posted: Tue May 28, 2013 7:18 pm
by velden
If you have a look at the sample templates you'll see that (almost) anything is possible.

You choose to use div's instead of ul's (which I'm missing in your last example where you do use <li> tag.).

Copy an example menu template to your favorite editor. Format it visually (indent, extra line breaks) and then try to understand what it's doing.

Then replace the proper tags with yours.

Re: how can i show the children in menumanager?

Posted: Tue May 28, 2013 8:55 pm
by Dr.CSS
In situations like this it is best if you show a working example or something we can see the structure of what you need, the paste you showed isn't quite enuf...