[ZPT] ZPT style question

Jean Jordaan jean@upfrontsystems.co.za
Tue, 01 Apr 2003 11:06:14 +0200


Hi all

In a product by a ZPT guru of note, I see code like this:

"""
<init tal:omit-tag=""
   tal:define="global disable_delete python:1;
     global disable_move_up python:1;
     global disable_move_down python:1" />
...
<content tal:replace="structure 
python:here.service_editor.renderElementsCache(request.node)" />
"""

Points to ponder:
1) using a non-standard tag (init) and then discarding it
    (omit-tag) or replacing it (in the case of content).
2) always keeping the tal: namespace with the attributes,
    instead of moving it to the elements.

Both snippets occur in the same template. Is there anything which
makes that preferable above always writing:

"""
<tal:init define="global disable_delete python:1;
                   global disable_move_up python:1;
                   global disable_move_down python:1" />
...
<tal:content replace="structure 
python:here.service_editor.renderElementsCache(request.node)" />
"""

-- 
Jean Jordaan
http://www.upfrontsystems.co.za