What is the recommended way for commenting page templates? The <dtml-comment> in dtml was awkward, but it was readily apparent that the content between the tags was for comment only. Could use html comments <!-- -->, unless you don't want the commentary in the published html. How are you handling this? Mark
Hi Mark, usually ZPT are self documenting if you can resist to dont do magic things there. For examle: <a href="to product info page" tal:attributes="href product/url" tal:contents="product/description">Description of a product</a> seems to be pretty self documenting. Add to this: well documented python scripts and stuff and if it is not enough: provide a propery with your ZPT where you can write extensive documentation. Regards Tino --On Sonntag, 3. November 2002 12:40 -0700 Mark Gibson <mark@dimensional.com> wrote:
What is the recommended way for commenting page templates? The <dtml-comment> in dtml was awkward, but it was readily apparent that the content between the tags was for comment only.
Could use html comments <!-- -->, unless you don't want the commentary in the published html.
How are you handling this?
Mark
_______________________________________________ Zope maillist - Zope@zope.org 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 )
I can see where ZPT can be made slightly more clear than reading html. I've never really seen self-documenting code, but I understand what you're saying, "Make the code as clear you can." I think there is always a place for in-line comments to make the code clearer than it is without them. I guess the answer is as Paul Winkler suggests: <span tal:replace="nothing"> Create link to product info </span> Mark Tino Wildenhain wrote:
Hi Mark,
usually ZPT are self documenting if you can resist to dont do magic things there. For examle: <a href="to product info page" tal:attributes="href product/url" tal:contents="product/description">Description of a product</a>
seems to be pretty self documenting. Add to this: well documented python scripts and stuff and if it is not enough: provide a propery with your ZPT where you can write extensive documentation.
Regards Tino
--On Sonntag, 3. November 2002 12:40 -0700 Mark Gibson <mark@dimensional.com> wrote:
What is the recommended way for commenting page templates? The <dtml-comment> in dtml was awkward, but it was readily apparent that the content between the tags was for comment only.
Could use html comments <!-- -->, unless you don't want the commentary in the published html.
How are you handling this?
Mark
_______________________________________________ Zope maillist - Zope@zope.org 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 )
_______________________________________________ Zope maillist - Zope@zope.org 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 )
Tino Wildenhain writes:
usually ZPT are self documenting I would like a documentation facility for macros, especially their implicit (i.e. non-slot) arguments.
Sometime, I will come up with a solution, but I can still take some time... Dieter
On Sun, Nov 03, 2002 at 12:40:28PM -0700, Mark Gibson wrote:
What is the recommended way for commenting page templates? The <dtml-comment> in dtml was awkward, but it was readily apparent that the content between the tags was for comment only.
Could use html comments <!-- -->, unless you don't want the commentary in the published html.
If you don't want to use html comments, this is more or less equivalent to <dtml-comment>, except that its purpose is not so explicit: <span tal:replace="nothing"> Commentary here... </span> -- Paul Winkler http://www.slinkp.com "Welcome to Muppet Labs, where the future is made - today!"
participants (4)
-
Dieter Maurer -
Mark Gibson -
Paul Winkler -
Tino Wildenhain