[ZDP] BackTalk to Document The Zope Book (2.5 Edition)/Dynamic Content with DTML

webmaster@zope.org webmaster@zope.org
Thu, 23 Jan 2003 16:17:13 -0500


A comment to the paragraph below was recently added via http://www.zope.org/Documentation/Books/ZopeBook/current/DTML.stx#5-1

---------------

          One use of the *fmt* attribute is to format monetary
          values. For example, create a *float* property in your root
          folder called *adult_rate*.  This property will represent
          the cost for one adult to visit the Zoo.  Give this property
          the value '2.2'.

            % Anonymous User - June 6, 2002 11:54 am:
             link to Appendix A?

            % Anonymous User - July 1, 2002 4:52 am:
             How in the world do I "create a float property" in my root folder?

            % Anonymous User - July 2, 2002 2:29 am:
             Not quite sure what "create a float property" exactly means either, but making a new Python script which just
             contains "return (2.2)" seems to do the trick. Is this the correct interpretation?

            % Anonymous User - July 3, 2002 10:13 am:
             Go to the Properties tab in the root folder. Here you will find the correct fields.

            % Anonymous User - Jan. 23, 2003 4:17 pm:
             Since this is supposed to illustrate fmt, not float properties, how about:
             <dtml-var "5.4876" fmt=dollars-and-cents>