[Product-Developers] Page Templates, browser/ , and skins

Derek Richardson derek.richardson at gatech.edu
Thu Jul 17 15:26:14 UTC 2008

I am attempting to get a pt I wrote in a z3 way to show in main 
template. When I put in the metal calls to embed it in main template, I 
get a KeyError on 'here'. I am currently assuming that this happens 
because of some magic associated with the skins directories of which I 
am not partaking. The only option I see is to put my pt in the skins 
directory. However, because this make the pt available on all contexts, 
while I want it on a restricted set of contexts (although not a single 
content type), I am loath to do this. Do I have another option than 
using the skins directories if I want the pt to show in the plone skin?

Traceback and code below sig.


Derek Richardson

2008-07-17 09:29:16 ERROR Zope.SiteErrorLog 
Traceback (innermost last):
   Module ZPublisher.Publish, line 119, in publish
   Module ZPublisher.mapply, line 88, in mapply
   Module ZPublisher.Publish, line 42, in call_object
   Module foo.bar.browser.publisher, line 56, in __call__
   Module zope.app.pagetemplate.viewpagetemplatefile, line 83, in __call__
   Module zope.app.pagetemplate.viewpagetemplatefile, line 51, in __call__
   Module zope.pagetemplate.pagetemplate, line 117, in pt_render
    - Warning: Macro expansion failed
    - Warning: exceptions.KeyError: 'here'
   Module zope.tal.talinterpreter, line 271, in __call__
   Module zope.tal.talinterpreter, line 346, in interpret
   Module zope.tal.talinterpreter, line 891, in do_useMacro
   Module zope.tal.talinterpreter, line 346, in interpret
   Module zope.tal.talinterpreter, line 536, in do_optTag_tal
   Module zope.tal.talinterpreter, line 521, in do_optTag
   Module zope.tal.talinterpreter, line 516, in no_tag
   Module zope.tal.talinterpreter, line 346, in interpret
   Module zope.tal.talinterpreter, line 870, in do_useMacro
   Module zope.tales.tales, line 696, in evaluate
    - URL: 
    - Line 3, Column 0
    - Expression: <PathExpr standard:u'here/global_defines/macros/defines'>
    - Names:
       {'args': (),
        'context': <ATTopic at /site/news/aggregator>,
        'default': <object object at 0x4b528>,
        'loop': {},
        'nothing': None,
        'options': {},
        'repeat': {},
        'request': <HTTPRequest, 
<zope.app.pagetemplate.viewpagetemplatefile.ViewPageTemplateFile object 
at 0x455d3d0>,
        'usage': <zope.pagetemplate.pagetemplate.TemplateUsage object at 
        'view': <Products.Five.metaclass.PublishTab object at 0x842f6f0>,
        'views': <zope.app.pagetemplate.viewpagetemplatefile.ViewMapper 
object at 0x84a3530>}
   Module zope.tales.expressions, line 217, in __call__
   Module Products.PageTemplates.Expressions, line 153, in _eval
   Module zope.tales.expressions, line 118, in _eval
KeyError: 'here'


<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
<metal:main fill-slot="main">
<tal:main-macro metal:define-macro="main">
     <select name="destination">
       <option value="none" selected="true">None</option>
       <tal:block tal:repeat="destination view/destinations">
         <option tal:attributes="value destination;"
                 tal:content="destination" />
       <option value="all">All</option>
   <div style="height: 1em"> </div>
   <div>Last published to [insert]: [insert]</div>
   <div style="height: 1em"> </div>
     <button type="submit" name="submit" value="publish">Publish</button>
     <button type="submit" name="submit" value="cancel">Cancel</button>
   <div style="height: 1em"> </div>
     These items will updated:
         <td style="border-bottom: black 1px solid">Item</td>
         <td style="border-bottom: black 1px solid">Last Modified</td>
   <div style="height: 1em"> </div>
     These items will be deleted:
   <div style="height: 1em"> </div>
     These items will be unchanged:


More information about the Product-Developers mailing list