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

Uli Fouquet uli at gnufix.de
Thu Jul 5 10:27:00 EDT 2007


Hi Sebastian,

Am Donnerstag, den 05.07.2007, 15:19 +0200 schrieb Sebastian Ware:
> I have tried some variations on the theme...

What variations?

>  and all I get is the  
> (rather general) error:
> 
>    TypeError: unsubscriptable object
> 
> I must say, error messages from Zope aren't all that explicit...

 :-) What is the 'unsubscriptable object'?

> 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" [...]

Nearly, but: 

	metal:use-macro="context/@@master/admin"

should work. The pattern here is: 'context/@@<view-name>/<macro-name>',
without 'macros'.

You might have a look at Philipps' nugenudge (I learned it from there):

	http://codespeak.net/svn/z3/NudgeNudge/trunk/src/nudgenudge

Should we include a little section about macros into the tutorial? Or a
mini-howto?  Obviously many people use them but seem to run into trouble
referencing them right, while it's easy, once you got it. On the other
hand macros are not part of Grok and described well at other places.

Cheers,

-- 
Uli




More information about the Grok-dev mailing list