[SOLVED] Splitting levels sites structure in two menus
Hi there,
I'd like to split my site structure in two menu-levels. I want the root pages (Home, About Us, Services) to be an inline menu in the header (that's no issue).
But I want the the second level to show up in the sidebar if there are any submenu-items. For example, services may have subpages like consultancy, project management and so on. This should be shown in the left-bar when services is selected
Home | About Us | Services | Etcetera
Submenu Services
Consulting
Project Management
Latest News
How do I split my sitestructure this way?
[SOLVED] Splitting levels sites structure in two menus
Using two menu modules, the first one with stoplevel 1 and hard limit checked, the second one (located in the sidebar) with startlevel 1
Re: Splitting levels sites structure in two menus
Almost solved....
Ok, the menu is showing up.... Does anyone knows how to set the title of the submenu to the value of it's parent?
so:
Home | About Us | Services | Contact
Services <- variable in the navigation module, derived from it's parent
- Consultancy
- Project Management
Re: Splitting levels sites structure in two menus
Hi prijke,
There is a previous post here regarding linking to a parent :
http://www.typolight-community.org/v...0&p=2392#p2392
This may help, so long as you only have one level of sub menus (which your example indicates)
I have had to remove this code from my sites until a fully working solution is found, or I can guarantee that a user will not add a further level.
Cheers,
Gary.
Re: Splitting levels sites structure in two menus
Hi Gary,
Since I am the owner and editor, I am pretty sure not to exceed the second level. I will look in to this. Thanks very much...
Re: Splitting levels sites structure in two menus
Hi Gary,
I just added {{env::parent_name}} into the title field of the module. This kinda works, but not entirely....
For example, if I choose from my main menu the option "DIENSTEN", the title of it's submenu shows MKBEYOND. If I then choose a subitem from tham menu, then the right title shows up.
http://www.mkbeyond.nl/tl/index.php/diensten.html
This is probably designed to be like this, but then it's not a good purpose I think. Or do I miss something? The title does'nt need to be clickable, so I think I don't have to change the template.
Re: Splitting levels sites structure in two menus
Hi Gary,
I think I nailed it.... I used {{env::main_alias}} instead of {{env::parent_alias}}.... This seems to do the trick
Re: [SOLVED] Splitting levels sites structure in two menus
Hi prijke,
You certainly have nailed it, and it works for all submenu levels - Many thanks!!
For clarity this is the code I am now using:
Code:
<a href="{{env::main_alias}}.html" title="{{env::main_title}}"><?php echo $this->headline; ?>
And an example is here:
http://cms-2.doublespark.eu/imageflow.html
Thanks again,
Gary.
Re: [SOLVED] Splitting levels sites structure in two menus
Great Gary,
So we helped each other!
Best wishes and be carefull with fireworks....
Paul