Terrel Shumway <tshumway@epicor.com> writes:
<dtml-let var1=expr1 var2=expr2> <dtml-var var1 fmt="date" ...> <dtml-var var2 ...> </dtml-let>
OK, now a problem with both of these is that they require a closing tag. What I need to do is set a variable only if it is not already passed in. Ie: <dtml-unless myvar1> Set myvar1 here </dtml-unless> various code here that uses myvar1 But, dtml-with or dtml-let won't work, because I have to close the tags for them before the closing dtml-unless tag -- I can never get to the code below with the new value. How does one get around this? Thanks, John
or <dtml-with some-complicated-expression> use the generated namespace </dtml-with>
I have found http://www.zope.org:18200/Members/Cyberrunner/QuickReference to be invaluable.
-- John Goerzen Linux, Unix consulting & programming jgoerzen@complete.org | Developer, Debian GNU/Linux (Free powerful OS upgrade) www.debian.org | ----------------------------------------------------------------------------+ The 750,434th digit of pi is 3.
John Goerzen wrote: [snip]
But, dtml-with or dtml-let won't work, because I have to close the tags for them before the closing dtml-unless tag -- I can never get to the code below with the new value. How does one get around this?
I suspect you might want to look into REQUEST.set(). i.e.: <dtml-call "REQUEST.set('foo', 'value of foo')"> Regards, Martijn
At 09:27 09/09/99 , Martijn Faassen wrote:
John Goerzen wrote: [snip]
But, dtml-with or dtml-let won't work, because I have to close the tags for them before the closing dtml-unless tag -- I can never get to the code below with the new value. How does one get around this?
I suspect you might want to look into REQUEST.set(). i.e.:
<dtml-call "REQUEST.set('foo', 'value of foo')">
But nobody reads his mail properly =) He just said he had problems with these variables dissapearing. My answer: If your variables don't exist anymore in sub mthods, you didn't pass in the REQUEST object. Make sure that you call the method with REQUEST=REQUEST in their call.. -- Martijn Pieters, Web Developer | Antraciet http://www.antraciet.nl | Tel: +31-35-7502100 Fax: +31-35-7502111 | mailto:mj@antraciet.nl http://www.antraciet.nl/~mj | PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149 ------------------------------------------
participants (3)
-
John Goerzen -
Martijn Faassen -
Martijn Pieters