[Zope3-Users] zpt pages though ZMI

Hassan Alirezaei hassan at isi.imi.i.u-tokyo.ac.jp
Sun Sep 24 06:43:42 EDT 2006


Hello everyone,

Does anyone know the easiest way to let people (principals of a site) 
develop their own pages with no knowledge about zop3 structure? AFAIK 
The users need to make their own pages with HTML (more generally ZPT) 
and upload them as a ZPT page.

I dont want my whole website skin to disappear so I use the 
context/@@standard_macros/page for the zpt page.

when I add it, the page renders fine for the Manager(ZCML) but not for 
other principals, apparently the title for each principal can not be 
traversed.

this is my zpt page which I upload through the ZMI as Manager:


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

</html>
----------------------------------------------------------------------------------------------------------------------------


and here is the error:
---------------------------------------------------------------------------------------------------------------------------
  File "/usr/local/Zope-3.3.0c1/lib/python/zope/tales/tales.py", line 
696, in evaluate
    return expression(self)
   - /home/hassan/HOMEPAGE2/modules/ISI/skin/template_tablelayout.pt
   - Line 59, Column 36
   - Expression: <PathExpr standard:u'request/principal/title'>
   - Names:
      {'args': (),
       'container': <zope.app.folder.folder.Folder object at 0xb50880ac>,
       'context': <zope.app.folder.folder.Folder object at 0xb50880ac>,
       'default': <object object at 0xb7d44550>,
       'loop': {},
       'nothing': None,
       'options': {},
       'repeat': {},
       'request': <zope.publisher.browser.BrowserRequest instance 
URL=http://124.102.91.194:8080/ZPTPage>,
       'template': <zope.app.zptpage.zptpage.ZPTPage object at 0xb50885ec>,
       'usage': <zope.pagetemplate.pagetemplate.TemplateUsage object at 
0xb503654c>}
  File "/usr/local/Zope-3.3.0c1/lib/python/zope/tales/expressions.py", 
line 217, in __call__
    return self._eval(econtext)
  File "/usr/local/Zope-3.3.0c1/lib/python/zope/tales/expressions.py", 
line 194, in _eval
    ob = self._subexprs[-1](econtext)
  File "/usr/local/Zope-3.3.0c1/lib/python/zope/tales/expressions.py", 
line 124, in _eval
    ob = self._traverser(ob, element, econtext)
  File 
"/usr/local/Zope-3.3.0c1/lib/python/zope/app/pagetemplate/engine.py", 
line 68, in __call__
    request=request)
  File "/usr/local/Zope-3.3.0c1/lib/python/zope/traversing/adapters.py", 
line 164, in traversePathElement
    return traversable.traverse(nm, further_path)
   - __traceback_info__: 
(<zope.app.security.principalregistry.UnauthenticatedPrincipal object at 
0xb7390b6c>, 'title')
  File "/usr/local/Zope-3.3.0c1/lib/python/zope/traversing/adapters.py", 
line 52, in traverse
    raise TraversalError(subject, name)
   - __traceback_info__: 
(<zope.app.security.principalregistry.UnauthenticatedPrincipal object at 
0xb7390b6c>, 'title', [])
TraversalError: 
(<zope.app.security.principalregistry.UnauthenticatedPrincipal object at 
0xb7390b6c>, 'title')

---------------------------------------------------------------------------------------------------------------------------------------




Not is this the expected behavior or am I doing something wrong???

thanks for any help.
Hass









More information about the Zope3-users mailing list