[ZPT] PageTemplateFile s and product attributes

Troy Farrell troy@entheossoft.com
Thu, 12 Dec 2002 12:34:21 -0600


Yep, the zpt below is a PageTemplateFile.  If I copy the code below into 
a ZODB template (Add Page Template), the added template works as 
expected.  It is as though my PageTemplateFile is not accepting my Role 
as Manager...  I'll let you know if I come up with a solution.

Thanks.
Troy

Clemens Robbenhaar wrote:
> Hi Troy,
> 
>  > I have a pt:
>  > 
>  >    security.declareProtected('View management screens', 'manage_workspace')
>  >    manage_workspace = PageTemplateFile('zpt/manage_workspace', 
>  > globals(), __name__='manage_workspace')
>  > 
>  > The pertient code in the zpt is this:
>  > 
>  > <html metal:use-macro="here/manage_minimal_template/macros/master">
>  >    <head>
>  >    </head>
>  >    <body>
>  >      <div id="main" metal:fill-slot="main">
>  > 
>  >      <span tal:content="here/icon" />
>  > 
>  >      </div>
>  >    </body>
>  > </html>
> 
> This is the file system version, I guess? 
> 'icon' is an atribute of Your class  -- how do You access this from the
> ZODB template? 
>  'here/icon' may not be work, except instances of Your class are
> folderish and the page template is placed within (or if some other
> acquisition happend) ?  
> 
> Sorry for asking stupid things back, but I cannot reproduce the issue
> now. Thanks for the traceback, anyway.
> 
> Clemens