[Zope] DTML method that displays comments when called from a DTML document

Dylan Reinhardt zope@dylanreinhardt.com
Thu, 13 Feb 2003 11:26:44 -0800


At 10:48 AM 2/13/2003, Asad Habib wrote:
>Hello. I have a DTML method which is being called from
>a DTML document. When called, the method prints all
>the comments it contains in the order in which its
>code is executed.

If the comments are HTML comments, eg:
<!-- some comment -->
then this would be expected.  Use DTML comments if you don't want them to 
pass through to the user.

If the comments are DTML comments, eg:
<dtml-comment> some comment </dtml-comment>
then your DTML is not being evaluated.

To fix the second case, use

<dtml-var "spam">

instead of

<dtml-var spam>

The former *evaluates* spam while the latter merely binds to it.

HTH,

Dylan