At 9/19/00 03:11 PM, Skip Montanaro wrote:
>I'd like to structure my DTML so it is vaguely readable:
>
>     <dtml-var "_['start'].strftime('%m/%d%y')">
>     <dtml-if "start != end"-->
>         -<dtml-var "_['end'].strftime('%m/%d%y')">
>     </dtml-if-->
>
>This means inserting newlines and doing some indenting.  Unfortunately,
>since I'm generating plain text, the newlines and indentation count (unlike
>with HTML)...

Even in HTML, the indents and newlines count by showing up as a space 
before the '-' in the above example. You can fix this with good readability 
simply by "delaying" the closing '>'. For example,

     <dtml-var "_['start'].strftime('%m/%d%y')"
    ><dtml-if "start != end"
        >-<dtml-var "_['end'].strftime('%m/%d%y')"
    ></dtml-if>





--
Dennis Nichols
[EMAIL PROTECTED]


_______________________________________________
Zope maillist  -  [EMAIL PROTECTED]
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 )

Reply via email to