[Zope] comments
Ben Glazer
glazer@scicomp.com
Tue, 22 Feb 2000 13:11:57 -0600
On Feb 21 2000 at 6:23 PM, Stephen Pitts wrote:
> I've been using HTML comment syntax
> lately, because it lets me do stuff like:
>
> <!-- <dtml-if foo> -->
> Hello
> <!-- </dtml-if> -->
Actually, this shouldn't work (the way you probably think it should).
Zope's DTML parser does not respect HTML comments, so the <dtml-if> is still
executed. As a simple example, try this:
<!-- <dtml-if "0"> -->
Not here!
<!-- </dtml-if> -->
The real advantage of using <dtml-comment> is that it is part of DTML, so
the DTML parser recognizes it. It's just a pain to type out every time you
want to comment something.
Regards,
Ben