How to show the menu as fully expanded
How to show the menu as fully expanded
I am creating a CMSimple theme that have a dropdown menu.
How do I show the menu as fully expanded with all menu levels open?
How do I show the menu as fully expanded with all menu levels open?
Re: How to show the menu as fully expanded
Hello,
which CMSimple you are using?
In CMSimple 4.1.3 and higher you can set in the template.htm:
The first 2 parameters are the minimal and the maximal menulevel.
The third parameter:
0 - dynamic Menu
1 - expanded menu
So the code example shows menulevel 1-3 in an expanded menu,
Gert
PS: An "automatic" open toc:
Menulevels as configured in the CMS Configuration.
which CMSimple you are using?
In CMSimple 4.1.3 and higher you can set in the template.htm:
Code: Select all
<?php echo toc(1,3,1);?>
The third parameter:
0 - dynamic Menu
1 - expanded menu
So the code example shows menulevel 1-3 in an expanded menu,
Gert
PS: An "automatic" open toc:
Code: Select all
<?php echo toc(1,$cf['menu']['levels'],1);?>
Re: How to show the menu as fully expanded
Instead ofsonnur wrote:How do I show the menu as fully expanded with all menu levels open?
Code: Select all
<?php echo toc();?>
Code: Select all
<?php echo li($hc, 'menulevel');?>
Both this and Gert's solution have a small drawback, however. The currently selected page is not marked up as <a>, so you would have to use li:hover instead of a:hover, what does not work on IE 6 for instance.
However, you can use xtoc as a drop in replacement for toc().
That goes terribly wrong with CMSimple_XH since 1.5.4--what a pity to enforce an incompatibility for having a feature that's "always" been there.Gert wrote:In CMSimple 4.1.3 and higher you can set in the template.htm:Code: Select all
<?php echo toc(1,3,1);?>
Gert wrote:An "automatic" open toc:
Code: Select all
<?php echo toc(null, null, 1);?>
Christoph M. Becker – Plugins for CMSimple_XH
Re: How to show the menu as fully expanded
Thanks for answers I did use:
Code: Select all
<?=li($hc,'sitemaplevel')?>
Re: How to show the menu as fully expanded
'sitemaplevel' is rather unconventional in this context, but it's okay if it works for you.
Christoph M. Becker – Plugins for CMSimple_XH
Re: How to show the menu as fully expanded
I've seen that this has changed in CMSimple 4.2.3, where the third parameter of toc() was removed, and instead there's a new function expToc() that can be used as replacement for toc(). Thanks, Gert.cmb wrote:That goes terribly wrong with CMSimple_XH since 1.5.4--what a pity to enforce an incompatibility for having a feature that's "always" been there.Gert wrote:In CMSimple 4.1.3 and higher you can set in the template.htm:Code: Select all
<?php echo toc(1,3,1);?>
Christoph M. Becker – Plugins for CMSimple_XH
Re: How to show the menu as fully expanded
No, it's not removed - expToc() is just added.cmb wrote:I've seen that this has changed in CMSimple 4.2.3, where the third parameter of toc() was removed, ...
Calls like toc(2,3,1) are a nice tool to set different tocs anywhere in the template, menulevels as wanted, dynamically or expanded, as ever someone wants. I will not remove this option,
Gert
Re: How to show the menu as fully expanded
Thanks for the clarification.Gert wrote:No, it's not removed - expToc() is just added.
I see your point now. But then, being able to specify a user (or template designer) defined li() seems to also be a nice tool. However, as it is now, a template designer who wants his templates to work under CMSimple v4 as well as CMSimple_XH can't use either tool. So we may consider to find a common solution.Gert wrote:Calls like toc(2,3,1) are a nice tool to set different tocs anywhere in the template, menulevels as wanted, dynamically or expanded, as ever someone wants.
Christoph M. Becker – Plugins for CMSimple_XH