Hi!
I wonder if it is possible to somehow leave out specific menu bar content depending on what Template the page is showing?
Confusing? I'll try to explain better. Here is an made up example of content in the menu bar:
1. home
2. Joes page
2.1 Content
2.2 Photo gallery
2.3 Special photos
3. Jills page
3.1 Content
3.2 Content2
3.2.1 Content2 - 1
4. Common information
5. links
6. Things for sale
I want a common Template for 1. Home (when you arrive to the page or when you click 'home')
Then when you click Jill or Joe they will be sent to their own template with totally diffrent look.
I also want '3.Jills page' to not be shown in the menu when you are in the template for Joe, and '2. Joes page' to not be shown in the menu when you are in Jills template. The other pages in the menu is ment to be common and available from both templates.
Is this possible to do this somehow?
Diffrent menu content shown depending on template?
Diffrent menu content shown depending on template?
Last edited by osn on Thu Sep 06, 2007 10:09 am, edited 1 time in total.
Dennis Nilsson, Sweden
www.dartfrog.tk
www.dartfrog.tk
Re: Diffrent menu content shown depending on template?
Dennis,
that is possible. In the template the calling of the menu is handled. So if you have different templates for every user, you can call the menu differently, showing only the menu for that user-down.
Use f.e.:
that is possible. In the template the calling of the menu is handled. So if you have different templates for every user, you can call the menu differently, showing only the menu for that user-down.
Use f.e.:
Ronny(optional) start_page="home" - Starts the menu displaying at the given start_page and showing that element and it's children only. Takes a page alias.
(optional) start_element="1.2" - Starts the menu displaying at the given start_element and showing that element and it's children only. Takes a hierarchy position (e.g. 5.1.2).
Re: Diffrent menu content shown depending on template?
Wow, I thought I was asking about impossible things here! Thank you RonnyK!!!
Dennis Nilsson, Sweden
www.dartfrog.tk
www.dartfrog.tk
Re: Diffrent menu content shown depending on template?
I have been taking a look at it the help in 'admin panel -> menu manager -> help' and there is a nice list of functions and optional parameters/functions, but what I miss is an example of how I use this optionals with the commands. I must say that I don't understand it at all, probably since I'm not an programmer or linux guy, but mabie someone can help me understand.
The function I think I'm after is:
(optional) excludeprefix="" - Exclude all items (and their children) who's page alias matches one of the specified (comma separated) prefixes. This parameter must not be used in conjunction with the includeprefix parameter.
So, is it in the menu template I want to use that parameter I'm adding this string into? anyone who can write an example of how it should look like or explain a little bit closer?
The function I think I'm after is:
(optional) excludeprefix="" - Exclude all items (and their children) who's page alias matches one of the specified (comma separated) prefixes. This parameter must not be used in conjunction with the includeprefix parameter.
So, is it in the menu template I want to use that parameter I'm adding this string into? anyone who can write an example of how it should look like or explain a little bit closer?
Dennis Nilsson, Sweden
www.dartfrog.tk
www.dartfrog.tk
Re: Diffrent menu content shown depending on template?
Dennis,
if you only want to show the children under the menu, with the name of the templates-user, I think that the
"{menu template='template' start_page='joes-page'}" is the one your after,
If you use the "includeprefix" or "excludeprefix", you basically mark the menus with similar prefixes, f.e. "hd_" for header, "sb_" for sidebar etc.... and call the {menu} with the prefix-parameter to show only/not the menu-entries with/without the prefix.
If you only want to show "Joes page" and its children, the start_page option, makes it possible to do so, and you only have to give in a single page in the menu-calling. With the start_element, the logic will already be ruined if you re-order the pages, making "Joes page" not "2" anymore but 3 instead f.e.
What is exactly what your after, on what page, maybe than a written solution can be handed.
The prefix-options will work if you have several pages on the same level that you want / do not want to show. In your case you want a single parent AND all children of that parent, so specific calling using start-page might be easier.
Ronny
if you only want to show the children under the menu, with the name of the templates-user, I think that the
"{menu template='template' start_page='joes-page'}" is the one your after,
If you use the "includeprefix" or "excludeprefix", you basically mark the menus with similar prefixes, f.e. "hd_" for header, "sb_" for sidebar etc.... and call the {menu} with the prefix-parameter to show only/not the menu-entries with/without the prefix.
If you only want to show "Joes page" and its children, the start_page option, makes it possible to do so, and you only have to give in a single page in the menu-calling. With the start_element, the logic will already be ruined if you re-order the pages, making "Joes page" not "2" anymore but 3 instead f.e.
What is exactly what your after, on what page, maybe than a written solution can be handed.
The prefix-options will work if you have several pages on the same level that you want / do not want to show. In your case you want a single parent AND all children of that parent, so specific calling using start-page might be easier.
Ronny
Last edited by RonnyK on Thu Sep 06, 2007 2:05 pm, edited 1 time in total.
Re: Diffrent menu content shown depending on template?
Thank you RonnyK!
Now I understand how I'm supposed to use it. Also thank you to Savagekabbage who helped me out with this in chat.
I thought it was possible to use the menu numbers to exclude also, but it's no problems to use prefixes now when I understand it.
thank you for really fast help!
Dennis
Now I understand how I'm supposed to use it. Also thank you to Savagekabbage who helped me out with this in chat.
I thought it was possible to use the menu numbers to exclude also, but it's no problems to use prefixes now when I understand it.
thank you for really fast help!
Dennis
Dennis Nilsson, Sweden
www.dartfrog.tk
www.dartfrog.tk


