Accordion menu status

tevart

Avatar: tevart

2010-04-04 16:11

I'm working on an accordion menu, which works fine. The only problem is, that when i open menu1 > submenu1 the menu doesn't stay opened when redirecting to page. I need to add id="open" to the div accButton. So every time John Doe or Jane Does is sellected, the id="open" is added to the accButton in menu1 (the menu stays open). If you sellect Project1 then id="open" is added to the accButton on menu2 so that menu2 stays open when you browse thru the menu2 subpages. Can anyone advise me, how to do this.

tnx
teva

Here's the code

<div id="menu1">
<div class="accButton" id="open">Cooworkers</div>
<ul class="accContent">
<li class="l1"><a href="#">John Doe</a></li>
<li class="l2"><a href="#">Jane Does</a></li>
</ul>
</div>

<div id="menu2">
<div class="accButton">Projects</div>
<ul class="accContent">
<li class="l3"><a href="#">Project1</a></li>
<li class="l4"><a href="#">Project2</a></li>
</ul>
</div>

» Quick.Cms v2.x

Makaron

Avatar: Makaron

2010-04-06 11:05

I think You can try with session variable in file core/pages.php in function throwMenu(). You can use if statement basing on variable $aData['iPageParent']. If You create session variable You can use it in file with menu template.

tevart

Avatar: tevart

2010-04-06 11:55

Hmmmm, i think this is too much for me, since i'm not programmer. I would trade you full code with instructions for accordion menu, for your help on this matter :)

Here's full menu formated for quick.cms. Only first link in the first menu is alive, to show opened menu.

http://servis-doma.net/test/harmonika/

tnx

tevart

Avatar: tevart

2010-04-15 17:16

Hey Makaron!

I'm trying to set this, but i have no luck, what so ever. Can you advise some more, how to get session variable.

tnx

Back to top
about us | contact