[ZDP] BackTalk to Document The Zope Book (2.6 Edition)/Basic DTML
webmaster at zope.org
webmaster at zope.org
Mon Apr 5 13:21:50 EDT 2004
A comment to the paragraph below was recently added via http://zope.org/Documentation/Books/ZopeBook/2_6Edition/DTML.stx#3-91
---------------
Suppose we're running a special. First time zoo visitors get in
for half price. Here's a DTML fragment that tests for a cookie
using the *hasVisitedZoo* variable and displays the price
according to whether a user is new or a repeat visitor::
<dtml-if hasVisitedZoo>
<p>Zoo admission <dtml-var adult_rate fmt="dollars-and-cents">.</p>
<dtml-else>
<p>Zoo admission for first time visitors
<dtml-var expr="adult_rate/2" fmt="dollars-and-cents"></p>
</dtml-if>
% Anonymous User - Apr. 5, 2004 1:21 pm:
A few paragraphs above, the value of fmt is written without quotation marks. Which one is preferred/right?
More information about the ZDP
mailing list