Menu: clicking parent should only expand menu, not open page
Menu: clicking parent should only expand menu, not open page
I have a menu with two levels.
The menu items with sublevels (parents) do not contain any content themselves.
I am trying to accomplish that clicking a parent only expands the menu to show the sublevel items. This should not open a page.
Is there menu that is able to do this in CMSMS?
The menu items with sublevels (parents) do not contain any content themselves.
I am trying to accomplish that clicking a parent only expands the menu to show the sublevel items. This should not open a page.
Is there menu that is able to do this in CMSMS?
Re: Menu: clicking parent should only expand menu, not open page
You should use the first level as "Section Header"
About styling and functions, are you already using any menu template?
About styling and functions, are you already using any menu template?
Re: Menu: clicking parent should only expand menu, not open page
Thanks for your reply!
That's what I thought but that makes the parent do nothing anymore.
Perhaps my menu has a problem.
That brings me to another question, appareantly it is possible to importe menu templates and apply them but where can I get menu's?
That's what I thought but that makes the parent do nothing anymore.
Perhaps my menu has a problem.
That brings me to another question, appareantly it is possible to importe menu templates and apply them but where can I get menu's?
Re: Menu: clicking parent should only expand menu, not open page
The function depends on your styling.
It depends what menu template you are using and if the styling is applied in your stylesheet.
Now the question is how good is your xhtml, css and smarty knowledge.
In the default installation you have few MenuManager templates and styling available, all you need to do is look for the part where it says type == 'sectionheader' check what is applied there like or something and adjust it in the CSS.
It depends what menu template you are using and if the styling is applied in your stylesheet.
Now the question is how good is your xhtml, css and smarty knowledge.
In the default installation you have few MenuManager templates and styling available, all you need to do is look for the part where it says type == 'sectionheader' check what is applied there like or something and adjust it in the CSS.
In the MenuManager you can see few Templates already listed like cssmenu.tpl if you click on "import to database" you can import it, name it and edit directly in MenuManager.That brings me to another question, appareantly it is possible to importe menu templates and apply them but where can I get menu's?
Last edited by uniqu3 on Thu Jul 01, 2010 12:44 pm, edited 1 time in total.
Re: Menu: clicking parent should only expand menu, not open page
None of the menu templates behave like they should with a menu parent configured as "section header". Can you confirm that "cssmnu" supports this?
Re: Menu: clicking parent should only expand menu, not open page
No i can't confirm, personally i never use default menus and styling so i can't tell you if any of these works out of the box and what stylesheet you will have to apply to your template.
You could take a look in the WIKI
http://wiki.cmsmadesimple.org/index.php ... nu_Manager
maybe there is something what you can start with or do you have a live example where we can see how your current markup looks like and what can be done.
You could take a look in the WIKI
http://wiki.cmsmadesimple.org/index.php ... nu_Manager
maybe there is something what you can start with or do you have a live example where we can see how your current markup looks like and what can be done.
Re: Menu: clicking parent should only expand menu, not open page
I applied the "section_expand" menu on http://test.euro-pa.com.
You can access the control panel with test/test.
You see that the menu opens and closes inconsistently.
If would appreciate it very much if you can take a look.
You can access the control panel with test/test.
You see that the menu opens and closes inconsistently.
If would appreciate it very much if you can take a look.
Re: Menu: clicking parent should only expand menu, not open page
how do you call your menu in the template?
It should work like this {menu template='yourmenuname' collapse='0'}
collapse='0' would solve your problem of menu collapsing when you go to subpage.
It should work like this {menu template='yourmenuname' collapse='0'}
collapse='0' would solve your problem of menu collapsing when you go to subpage.
Re: Menu: clicking parent should only expand menu, not open page
I use {menu template='section_expand' collapse='0'} in the templates.
Still it behaves weird, opening 2 menu's when you open a menu.
Still it behaves weird, opening 2 menu's when you open a menu.
Re: Menu: clicking parent should only expand menu, not open page
yes i noticed my theory was wrong
i'll test the menu on my demo installation.

Re: Menu: clicking parent should only expand menu, not open page
Ok i didn't get it to work as it should, same problem as on your site so another solution.
Download treeview plugin:
http://www.dynamicdrive.com/dynamicinde ... eeview.zip
Menu template:
In your Template:
Add jquery and treeview plugin
The menu i named the template treemenu
See demo: http://demo.i-arts.eu/home
Download treeview plugin:
http://www.dynamicdrive.com/dynamicinde ... eeview.zip
Menu template:
Code: Select all
{if $count > 0}
<ul id="navigation">
{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 and $node->haschildren == true)}
<li><a class="current" {elseif $node->current == true}
<li><a class="current" {elseif $node->haschildren == true}
<li><span {elseif $node->type == 'sectionheader'}
<li>{$node->menutext} {elseif $node->type == 'separator'}
<li>{else}
<li><a {/if} {if $node->type != 'sectionheader' and $node->type != 'separator'}href="{$node->url}" {if $node->accesskey != ''}accesskey="{$node->accesskey}" {/if}{if $node->tabindex != ''}tabindex="{$node->tabindex}" {/if}{if $node->titleattribute != ''}title="{$node->titleattribute}"{else}title="{$node->menutext}"{/if}{if $node->target ne ""} target="{$node->target}"{/if}><dfn>{$node->hierarchy}: </dfn>{$node->menutext}</a>
{elseif $node->type == 'sectionheader'}><dfn>{$node->hierarchy}: </dfn>{$node->menutext}</span>{/if}{/foreach}{repeat string="</li></ul>" times=$node->depth-1}</li></ul>
{/if}
Add jquery and treeview plugin
Code: Select all
<__script__ type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></__script>
<__script__ type="text/javascript" src="uploads/scripts/jquery.treeview.min.js"></__script>
{literal}
<__script__ type="text/javascript">
$(document).ready(function(){
$("#navigation").treeview({
collapsed: true,
unique: true,
persist: "location"
});
});
</__script>
{/literal}
Code: Select all
{menu template='treemenu'}
Re: Menu: clicking parent should only expand menu, not open page
Thanks for the effort in advance!
I don't understand the demo, you mean the menu top right but it does not expand/collapse.
Am I missing something?
Thanks again.
I don't understand the demo, you mean the menu top right but it does not expand/collapse.
Am I missing something?
Thanks again.
Re: Menu: clicking parent should only expand menu, not open page
yes top right and oh forgot to mention, "test" is collapsible.
Re: Menu: clicking parent should only expand menu, not open page
I guess I add the content of "jquery.treeview.zip" to my CMSMS directory?
What stylefile to use?
Thanks again.
What stylefile to use?
Thanks again.
Re: Menu: clicking parent should only expand menu, not open page
i usually add all my js files in the theme folder.
Mostly on my websites it look like this /uploads/Themename/js/somejsfile.js but you can also put it somewhere else as long you call in the template right.
For example on my demo page:
I didn't use any stylesheet included in the pack, you can style it as you want, so if you already styled you navigation like {menu template='treemenu'} you are good to go.
As long as you adjust the path to the script you should be good to go by copy/pasting my examples above.
Mostly on my websites it look like this /uploads/Themename/js/somejsfile.js but you can also put it somewhere else as long you call in the template right.
For example on my demo page:
Code: Select all
<__script__ type="text/javascript" src="uploads/scripts/jquery.treeview.min.js"></__script>
As long as you adjust the path to the script you should be good to go by copy/pasting my examples above.