[Zope] Using folder name in macro

Chris Withers chris at simplistix.co.uk
Tue Mar 14 17:35:02 EST 2006


John Poltorak wrote:
>>> <metal:macro metal:use-macro="context/[folder_name].pt/macros/page">

<metal:macro 
metal:use-macro="python:getattr(context,folder_name+'.pt').macros['page']">

If you end up doing this, I would suggest your application design is 
pretty broken and should be thought out different :-/

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk



More information about the Zope mailing list