[Zope] calling macros

Johan Carlsson johanc at easypublisher.com
Tue Apr 20 09:23:37 EDT 2004


Marius Gleeson wrote:
> Yes I understand that. However the macro that I am calling uses the
> 'here' object, which references the object defined outside the loop, not
> the one that is referenced by 'obj'. What I want to do is to call the
> macro so that the 'here' reference is now set to the same object as 'obj'

Isn't it possible to look up the macro from the obj?
(I guess not from Geir's earlier response, but I sure feels intuitive?)

E.g.
<metal:block tal:repeat="obj folderContents">
<dd>
<div tal:condition="python: obj.portal_type == 'News Item'">
   <metal:use use-macro="obj/newsitem_view/macros/main"/>
------------------------^^^
</div>
</dd>
</metal:block>





-- 
Johan Carlsson          Tel: + 46 8 31 24 94
Colliberty              Mob: + 46 70 558 25 24
Torsgatan 72            Email: johanc at easypublisher.com
SE-113 37 STOCKHOLM     Skype: colliberty





More information about the Zope mailing list