[Zope3-Users] Standard Macros

Hassan Alirezaei hassan at isi.imi.i.u-tokyo.ac.jp
Sun Feb 11 17:39:36 EST 2007


Hi Marius

thanks for the response. you are right that was a typo,  
"views/standard_macros" is totaly wrong.
however, the problem still remains the same:
even

<html metal:use-macro="context/@@standard_macros/page">
</html>

or

<html metal:use-macro="template/@@standard_macros/page">
</html>

won't work.  I get the same old error as my other post.

Any Ideas are appriciated. and more importantly, do other people get the 
same error as I get??? I would really appriciate if someone tried the 
above code in a ZPTPage through ZMI and tell me the results...

Thanks alot.
Hass

Marius Gedminas wrote:
> On Sat, Feb 10, 2007 at 09:50:55AM +0100, David Johnson wrote:
>   
>> Is there a way to use standard_macros in a ZPT Page added via the  
>> ZMI?  In a page registered via ZCML the following METAL is okay,  
>> however in a ZPT Page I receive an error regarding a key error for  
>> "views".
>>
>> <html metal:use-macro="views/standard_macros/page">
>>
>> </html>
>>
>> Any ideas?
>>     
>
> ZPT Pages are content objects.  @@standard_macros is for ZMI views.
> Your wish to use a ZMI-specific macro in a content object is strange.
>
> You probably can access it with template/@@standard_macros/foo even from
> a ZPT Page.  I think 'template' is in the namespace of every page
> template, and I think @@standard_macros is registered for everything.
>
> FWIW views/foo is an old-fashioned spelling of context/@@foo.
>
> Marius Gedminas
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> Zope3-users mailing list
> Zope3-users at zope.org
> http://mail.zope.org/mailman/listinfo/zope3-users
>   



More information about the Zope3-users mailing list