how can i show the children in menumanager?

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
piphansdk
Forum Members
Forum Members
Posts: 30
Joined: Fri Jan 20, 2012 9:19 am

how can i show the children in menumanager?

Post 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}
staartmees
Power Poster
Power Poster
Posts: 1049
Joined: Wed Mar 19, 2008 4:54 pm

Re: how can i show the children in menumanager?

Post 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.
piphansdk
Forum Members
Forum Members
Posts: 30
Joined: Fri Jan 20, 2012 9:19 am

Re: how can i show the children in menumanager?

Post 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
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am
Location: The Netherlands

Re: how can i show the children in menumanager?

Post 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.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: how can i show the children in menumanager?

Post 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...
Post Reply

Return to “Modules/Add-Ons”