Salutations, I've been staring at this one for a while, but I can't quite seem to pull it off. I'd like to render a document based on the contents of a variable. For example (simplified): <dtml-call "REQUEST.set('foo', 'index_html')"> <dtml-var foo> should (would? could? I'd like!) render index_html. Double quotes don't cut it (both print the string 'index_html') :-( Regards, Daryl Tester
Daryl Tester wrote:
I've been staring at this one for a while, but I can't quite seem to pull it off.
And of course, 30 seconds after posting the answer strikes my pointy head like demented lightning hitting a lightning rod. Ow.
<dtml-call "REQUEST.set('foo', 'index_html')"> <dtml-var foo>
<dtml-var "_[foo]"> *Sigh* Homer sleep now. Regards, Daryl Tester
on Wednesday, March 29, 2000 Daryl Tester wrote : DT> Salutations, DT> I've been staring at this one for a while, but I can't quite seem to DT> pull it off. DT> I'd like to render a document based on the contents of a variable. DT> For example (simplified): DT> <dtml-call "REQUEST.set('foo', 'index_html')"> DT> <dtml-var foo> DT> should (would? could? I'd like!) render index_html. Double DT> quotes don't cut it (both print the string 'index_html') :-( try <dtml-var "_[foo]"> -- Geir Bækholt Hansen web-developer/designer geirh@funcom.com http://www.funcom.com
At 21:37 29/03/00 +0930, you wrote:
Salutations,
I've been staring at this one for a while, but I can't quite seem to pull it off.
I'd like to render a document based on the contents of a variable. For example (simplified):
<dtml-call "REQUEST.set('foo', 'index_html')"> <dtml-var foo>
<dtml-call "REQUEST.set('foo',index_html)"> <dtml-var foo> looks like it works
should (would? could? I'd like!) render index_html. Double quotes don't cut it (both print the string 'index_html') :-(
Regards, Daryl Tester
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Richard Moon richard@dcs.co.uk
Richard Moon wrote:
<dtml-call "REQUEST.set('foo', 'index_html')"> <dtml-var foo>
<dtml-call "REQUEST.set('foo',index_html)"> <dtml-var foo>
looks like it works
In my case, 'foo' must be a string, and is actually passed in via a POST (I need it to maintain state in a "wizard" style form). Regards, Daryl Tester
participants (3)
-
Daryl Tester -
Geir B Hansen -
Richard Moon