Page 2 of 2

Re: Multilevel (3 depth) jQuery Accordion Side Menu

Posted: Tue Dec 21, 2010 3:50 pm
by nicmare
well, to be honest, i have no idea for now. you could send me admin access via pm and i can take a closer look

Re: Multilevel (3 depth) jQuery Accordion Side Menu

Posted: Wed Dec 29, 2010 2:43 pm
by concentre
Well -- I never could figure out how to get an additional level, so I ended up using a completely different solution. Here's the link to what I used:

http://forum.cmsmadesimple.org/index.ph ... 152.0.html

The solution I used is the second one, posted by Nan.

Thanks nicmare for all your help.

Re: Multilevel (3 depth) jQuery Accordion Side Menu

Posted: Mon Sep 05, 2011 11:55 am
by badoul
Hi nicmare
i used your solution who works very smoothly.
But now i am observed that when i add a new section (title menu) who has no sub category the page load and close the menu without any effect.
Do you know how can i change this?
And i have one more question.
How can i do to have separate class for each li (or parent). Maybe based on the active title menu.
Like this i can custom each menu. ;D
thanks for any idea


b

Re: Multilevel (3 depth) jQuery Accordion Side Menu

Posted: Tue Nov 22, 2011 1:04 pm
by jd447
badoul wrote:Hi nicmare

How can i do to have separate class for each li (or parent). Maybe based on the active title menu.


b
replace the menu template (.tpl) with this one

Code: Select all

{assign var='number_of_levels' value=10000}
{if isset($menuparams.number_of_levels)}
  {assign var='number_of_levels' value=$menuparams.number_of_levels}
{/if}

{if $count > 0}
<ul class="menu" id="menu">
{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string="<ul>" times=$node->depth-$node->prevdepth}
{elseif $node->depth < $node->prevdepth}
{repeat string="</li></ul>" times=$node->prevdepth-$node->depth}
</li>
{elseif $node->index > 0}</li>
{/if}

{if $node->parent == true or $node->current == true}
  {assign var='classes' value='selected'}
  {if $node->parent == true}
    {assign var='classes' value='selectedparent'}
  {/if}
  {if $node->children_exist == true and $node->depth < $number_of_levels}
    {assign var='classes' value=$classes|cat:' parent'}
  {/if}
  <li class="{$classes}"><a class="{$classes}" href="{$node->url}"><span>{$node->menutext}</span></a>

{elseif $node->children_exist == true and $node->depth < $number_of_levels and $node->type != 'sectionheader' and $node->type != 'separator'}
<li class="parent"><a class="parent" href="{$node->url}"><span>{$node->menutext}</span></a>

{elseif $node->current == true}
<li class="currentpage"><h3><span>{$node->menutext}</span></h3>

{elseif $node->type == 'sectionheader'}
<li class="sectionheader"><span>{$node->menutext}</span>

{elseif $node->type == 'separator'}
<li class="separator" style="list-style-type: none;"> <hr />

{else}
<li><a href="{$node->url}"><span>{$node->menutext}</span></a>

{/if}

{/foreach}
{repeat string="</li></ul>" times=$node->depth-1}</li>
</ul>
{/if}

Re: Multilevel (3 depth) jQuery Accordion Side Menu

Posted: Tue Nov 22, 2011 3:08 pm
by jd447
is there a way to close a menu when it's clicked again?

thanks for your help!

Re: Multilevel (3 depth) jQuery Accordion Side Menu

Posted: Mon Jan 30, 2012 2:10 pm
by Festarossa
boby wrote:This is great, just what I was looking for.

The only thing when I click on a page link, the menu closes itself.

Is it posible to get the menu open to the current page?

May be I missed something... is it easy to emplement?

thanks for any help
For me too, this is perfect, with the same exception: I would need the menu to stay open. Is there any solution for this? I'm not very good with javascript or smarty... Thanks in advance for any ideas.

EDIT: I use the solution provided in the first message of this topic.

Re: Multilevel (3 depth) jQuery Accordion Side Menu

Posted: Tue Aug 27, 2013 3:21 pm
by frany
Thank you very much to SigisM and nicmare, this is waht I have been looking for.

Un fortunately the SigisM's menu It doesn't work to me, but nicmare one is working very well.

I hope to come back for learn a load of things.

Thanks.

Kind Regards.

Re: Multilevel (3 depth) jQuery Accordion Side Menu

Posted: Wed Oct 16, 2013 8:39 pm
by andre_designer
the first post is nice and its working on its own good. But i /you can't open the page from the parent item. how can i make this work so that i can click/visite all the pages. my jquery knowledge is level newbie. so if anyone can help that should be nice.

Re: Multilevel (3 depth) jQuery Accordion Side Menu

Posted: Thu Oct 17, 2013 7:20 pm
by Dr.CSS
We would need to see the problem site to offer any help...