Thanks Darryl

you were right about the title attribute of unauthenticated principals. they don't have it.
I made another ZCML principal with a title and it works fine.

The problem still remains the same though for the principals in the PAU. I always thought they do have a "title" bacause it is shown on "ordinary pages" when you login. ( well unauthenticated principals also show up :) )

I checked it with Boston skin. The principal title gets rendered but there is again another problem with some "econtext.view" that messes everything up again. I will try to figure that out or just borrow the request/principal/title part from boston skin and hang with my own skin which I like better.

Thanks again

Darryl Cousins wrote:

Your problem is
in /home/hassan/HOMEPAGE2/modules/ISI/skin/ and
UnauthenticatedPrincipal does not have attribute 'title'.

Check Boston skin template which first tests for authenticated user
before calling request/principal/title.


On Sun, 2006-09-24 at 19:43 +0900, Hassan Alirezaei wrote:
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">


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


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

thanks for any help.

Zope3-users mailing list

Zope3-users mailing list

Reply via email to