[Logo] Forums for GrailsFlow, Weceem, XSLfast
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
<wcm:widget path="widgets/left-menu" param="125"/>  XML
Forum Index » Weceem Forum
Author Message
or3L



Joined: 21/06/2010 10:24:35
Messages: 46
Location: Melbourne, Australia
Offline

Hi guys,

I want to call my widget in my template. So if I do <wcm:widget path="widgets/left-menu" />
It works well, however I don't want to do that.
Indeed, I want to have a new arg in this tag lib in order to pass some information (<wcm:widget path="widgets/left-menu" param="125"/> ).
For example, imagine if I have ten templates and I want to call the same widget.
Imagine in my widget, I want to do

Nonetheless, I don't use the same id in my templates when I call this widget
So, I want to do something like that:


How can I do ?

Thanks
marcpalmer



Joined: 04/06/2009 13:36:35
Messages: 286
Location: UK
Offline

Hiya,

Thanks for using weceem!

To pass data to widgets, you can pass in a model, but I think you can also just set an existing variable (although this is like ugly global variables!):



In your widget you just use $varX

Sorry this isn't documented yet!


- -
Twitter: wangjammer5
Blog: http://www.anyware.co.uk
Grails plugins: http://www.grailsrocks.com
[WWW]
or3L



Joined: 21/06/2010 10:24:35
Messages: 46
Location: Melbourne, Australia
Offline

Nice ! Thank you Marc !

This message was edited 1 time. Last update was at 26/08/2010 22:45:34

sprangi



Joined: 15/12/2011 11:41:32
Messages: 1
Offline

I have to use ${varX} to get it working
 
Forum Index » Weceem Forum
Go to:   
Powered by JForum 2.1.8 © JForum Team