[Zope] Conditional variable setting

John Goerzen jgoerzen@complete.org
23 Oct 1999 16:24:01 -0500


Hi,

I need to be able to conditionally set some text.  Here is my existing 
code.  What I'd prefer to be able to do is avoid both the dtml-with
and the REQUEST.set.  I hope I can at least avoid the latter.  Can you 
tell me how?  I cannot figure out how to add on to the existing string 
-- there seems to be no concatenate option and <dtml-call "displaytext 
= displaytext + 'blah'"> only gives an error.

Thanks!

<dtml-with "_.namespace(displaytext='Here, you can find information on
 upcoming ACLUG events.  There is always time for Q&amp;A -- drop by
 with a list of questions if you want!')">

<dtml-if mode-calendar>
  <dtml-call "REQUEST.set('displaytext2', displaytext)">
<dtml-else>
  <dtml-call "REQUEST.set('displaytext2', displaytext + 'Hint: for a nicer interface, click on Calendar!')">
</dtml-if>


-- 
John Goerzen   Linux, Unix consulting & programming   jgoerzen@complete.org |
Developer, Debian GNU/Linux (Free powerful OS upgrade)       www.debian.org |
----------------------------------------------------------------------------+
The 588,331st digit of pi is 6.