I am developping a new menu template for the Menu Manager. Everything works fine but I need to pass some parameters to the menu template, i.e. I would like to write something like {menu template="myTemplate.tpl" myParam="...."}. Is there a way to achieve this ?
Thanks for your help
Menu template & parameters
Re: Menu template & parameters
What kind of parameters?
id, class, ?
What ver. of CMSMS, hosted or at home?
id, class, ?
What ver. of CMSMS, hosted or at home?
-
rgreset
Re: Menu template & parameters
I am using CMSMS Version 1.0beta6 on my own server.
I am writing a menu template that use JSCookMenu (http://jscook.sourceforge.net). This script needs at least 2 parameters: 1) the orientation of the menu (vertical or horizontal) and the theme of the menu ('ThemePanel' for instance). Instead of hardcoding them in the tpl file, I would like to pass them when I use the menu, i.e. I would like to write in my page template:
{menu template="jscookmenu.tpl" orientation="hbr" theme="ThemePanel"}
Is there a way to do that ?
Thxs
I am writing a menu template that use JSCookMenu (http://jscook.sourceforge.net). This script needs at least 2 parameters: 1) the orientation of the menu (vertical or horizontal) and the theme of the menu ('ThemePanel' for instance). Instead of hardcoding them in the tpl file, I would like to pass them when I use the menu, i.e. I would like to write in my page template:
{menu template="jscookmenu.tpl" orientation="hbr" theme="ThemePanel"}
Is there a way to do that ?
Thxs
-
jhlipsey
Re: Menu template & parameters
I am trying to do the same thing. I wish to pass one or more strings to my template as variables that can be inserted as ID or class identifiers.
Any help in accomplishing this would be greatly appreciated.
Any help in accomplishing this would be greatly appreciated.
-
calguy1000
- Support Guru

- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: Menu template & parameters
try creating the smarty variable first, then using it inside your menu manager template
then you can access $orientation inside the template.
Code: Select all
{assign var=orientation value="vertical"}
{menu template="whatever"}Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.

