[ZPT] Zope newbie question on accessing DTML Methods from ZPT

Jean Jordaan jean at upfrontsystems.co.za
Fri May 30 17:10:44 EDT 2003


> You could also use 'neutral tags':
> 
>  <metal:x use-macro="container/macrosdoc.zpt/macros/page2">
>     <metal: fill-slot="body">
>        Just something to print
>        <tal:x replace="structure here/navigation"/>
>     </metal:x>
>  </metal:x>

I also like those, but try to avoid the x's when at all possible:

  <metal:subsection use-macro="container/macrosdoc.zpt/macros/page2">
     <metal:body fill-slot="body">
        Just something to print
        <tal:navigation replace="structure here/navigation"/>
     </metal:body>
  </metal:subsection>

Admittedly, in this case, the tag information is pretty
redundant, but most of the time it's useful .. for example, when
rendering a Formulator form:

<tal:groups define="form python:getattr(here, options['form_id'])"
             repeat="group form/get_groups">
<tr><th><tal:grouptitle replace="group" /></th></tr>
<tal:fields repeat="field python:form.get_fields_in_group(group)">
...
</tal:fields>
</tal:groups>

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




More information about the ZPT mailing list