[Solved] How to show parent of subitems in menu

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
msnijder
Forum Members
Forum Members
Posts: 16
Joined: Sun May 09, 2010 3:36 pm

[Solved] How to show parent of subitems in menu

Post by msnijder »

Hi there guys!

First of all I would like to say that CMSMS is 1000x better than Joomla.. I switched a few weeks ago and never want to go back :) Okay I'm just toying around a bit with CMSMS and I just can't figure out how to solve my problem.

My menu:

- Home
- Item 2
     - Subitem 1
     - Subitem 2
- Item 3

For better details, take a look at: www.voison.nl/smilow/

Now I want to show the parent-items (Home, Item 2, Item 3) horizontal at the top of the website. But when I choose for example Item 2, I want to show in my second menu (vertical at the side) the Subitems (this works) including the current parrent. So that it looks like this:

Home        [Item 2]       Items 3

Item 2
Subitem 1
Subitem 2

Does somebody knows how to achieve this using the parameters? Currently I am doing the following:

Code: Select all

//Horizontal menu
<div id="menuHoriz">
       {menu template='simple_navigation.tpl' collapse='1' start_level='1' number_of_levels='1'}
</div>


//vertical menu
<div id="menuVert">
       {menu template='simple_navigation.tpl' collapse='1' start_level='2'}
</div>
Help would be much appreciated!
Michiel
Last edited by msnijder on Sun May 09, 2010 6:42 pm, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: How to show parent of subitems in menu

Post by Dr.CSS »

This has been asked and answered many times, please do a search for it...
msnijder
Forum Members
Forum Members
Posts: 16
Joined: Sun May 09, 2010 3:36 pm

Re: How to show parent of subitems in menu

Post by msnijder »

Dr.CSS wrote: This has been asked and answered many times, please do a search for it...
I did and found a wiki that didn't worked for me because it gave an error. So then I posted this question. But I have found a solution using the CGSimpleSmarty module. So anyhow thanks for your reply. :)

For everyone else:

Install the CGSimpleSmarty Module and add the following line to the place where you want to display the title of the current parrent page:

Code: Select all

<h2>{$cgsimple->get_root_alias('','root_alias')}{$cgsimple->get_page_title($root_alias)}</h2>
Last edited by msnijder on Sun May 09, 2010 6:43 pm, edited 1 time in total.
Locked

Return to “CMSMS Core”