Page 1 of 1
Menu template & parameters
Posted: Sat Aug 26, 2006 1:47 pm
by rgreset
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
Re: Menu template & parameters
Posted: Sat Aug 26, 2006 5:04 pm
by Dr.CSS
What kind of parameters?
id, class, ?
What ver. of CMSMS, hosted or at home?
Re: Menu template & parameters
Posted: Sat Aug 26, 2006 5:44 pm
by rgreset
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
Re: Menu template & parameters
Posted: Thu Sep 14, 2006 6:14 pm
by jhlipsey
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.
Re: Menu template & parameters
Posted: Thu Sep 14, 2006 7:04 pm
by calguy1000
try creating the smarty variable first, then using it inside your menu manager template
Code: Select all
{assign var=orientation value="vertical"}
{menu template="whatever"}
then you can access $orientation inside the template.