Hi,
[EMAIL PROTECTED] wrote:
> First off, thanks to Christopher Arndt for the following doc:
>
> Templates for using TurboCheetah with TurboGears
> http://trac.turbogears.org/turbogears/wiki/TurboCheetahTemplates
It's nice to hear that somebody found this useful :-)
> I pass in aWidget, which is enough to trigger the set up of the JS and
> CSS entities. However, I don't know how to set up the cheetah template
> such that I can invoke the render() method on the widget within the
> template. To get around this I simply pass the xml string as well.
>
> Does any one know how to change the template so that I can do something
> like ${aWidget.render()} instead of passing in the xml string as well?
Normally ${aWidget.render()} should work, but the autocalling feature of
the Cheetah namemapper seems to get in the way here. I think this is a
bug and have brought it up on the Cheetah mailing list*, but did not get
a reply yet.
You can work around it using either of the two following syntax forms:
${getattr(aWidget, 'render')()}
or
${getVar('aWidget.render', autoCall=False)()}
Chris
* http://sourceforge.net/mailarchive/message.php?msg_id=30070548
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---