[Zope] including a dtml method through a variable

Derek S. Wilson dwilson at abrazohealth.com
Mon Oct 13 18:33:31 EDT 2003

Generally, variables return values, and you would just keep the same
variable name and return different values. If you're not wanting to
return values, but return something else, then don't use dtml-var. You'd
want to do an eval or something else.

Derek Wilson

-----Original Message-----
From: Declan Shanaghy [mailto:dshanaghy at 350nice.com] 
Sent: Monday, October 13, 2003 3:28 PM
To: zope at zope.org
Subject: [Zope] including a dtml method through a variable

With reference to the usual dtml-var to include a dtml-method in another
page. i.e.

<dtml-var page_dtml_widget>

How is it possible to do this dynamically?
Lets say in some pyhton script i execute a line like this:

if a:
  REQUEST.set("widget", "page_dtml_widget1")
  REQUEST.set("widget", "page_dtml_widget2")

Later on in the dtml method, how can i use that variable for a dynamic

<dtml-var widget>...
...Obviously doesnt work, it just prints out the value of the variable.
After much head scratching i still cant get around this. Any suggestions

Zope maillist  -  Zope at zope.org
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-dev )

More information about the Zope mailing list