[Grok-dev] How do I reference a common template in the statics folder?

Sebastian Ware sebastian at urbantalk.se
Fri Jul 6 09:40:56 EDT 2007


I should have added "...then it works..." :)

6 jul 2007 kl. 15.30 skrev Sebastian Ware:

> It turns out that my error was due to the following attribute in my  
> <html> tag
>
> <html xmlns:metal="http://xml.zope.org/namespace/metal"
>       metal:define-macro="admin_template">
>
> If I write this:
> <html metal:define-macro="admin_template">
>
> ...or this...
>
> <html xmlns:tal="http://xml.zope.org/namespaces/tal"
>       xmlns:metal="http://xml.zope.org/namespaces/metal"
>       metal:define-macro="admin_template">

...then it works...

>
> The problem here is the rather useless error message... "TypeError:  
> unsubscriptable object"
> Unless one starts with a working pattern, it is close to impossible  
> to realise where it is broken.
>
> Mvh Sebastian
>
> 5 jul 2007 kl. 15.19 skrev Sebastian Ware:
>
>> I have tried some variations on the theme... and all I get is the  
>> (rather general) error:
>>
>>   TypeError: unsubscriptable object
>>
>> I must say, error messages from Zope aren't all that explicit...
>>
>> Mvh Sebastian
>>
>>
>> 5 jul 2007 kl. 15.02 skrev Luciano Ramalho:
>>
>>> On 7/5/07, Sebastian Ware <sebastian at urbantalk.se> wrote:
>>>> TraversalError: (<protoncms.protonworkflow.ProtonWorkflow object at
>>>> 0x3194d70>, 'macros')
>>>> ##my_render_template.pt
>>>> [...] metal:use-macro="context/@@macros/admin" [...]
>>>
>>> I haven't tried it, but maybe your're missing the master  
>>> reference in that path?
>>>
>>>> [...] metal:use-macro="context/@@master/macros/admin" [...]
>>>
>>> Cheers,
>>>
>>> Luciano
>>
>> _______________________________________________
>> Grok-dev mailing list
>> Grok-dev at zope.org
>> http://mail.zope.org/mailman/listinfo/grok-dev
>
> _______________________________________________
> Grok-dev mailing list
> Grok-dev at zope.org
> http://mail.zope.org/mailman/listinfo/grok-dev



More information about the Grok-dev mailing list