Jean-Marc Orliaguet wrote:
Jim Fulton wrote:

Jean-Marc Orliaguet wrote:

Stephan Richter wrote:

On Sunday 11 September 2005 11:32, Jean-Marc Orliaguet wrote:

it there any technical reason why:

tal:define="displayable nocall:context/displayable"

could not return the adapted object based on the context instead of
triggering a traversal error?

Yes. You are not using the path adapter syntax as far as I can see.
You need to have: object/path_adapter_name:function

You should check the parsing implementation (probably some
traversing code) to see about the assumptions.


I know that, I was about to file this as a bug, or write a proposal
to let

tal:define="adapted nocall:object/path_adapter_name"

return the adapted object, but I found a workaround, by adding:

You both are off on the path adapter syntax.  The syntax allows
the attribute name to be ommitted.  You can write:

 tal:define="adapted nocall:object/path_adapter_name:"

(note the trailing colon)

Yes, this is what I tried first (by guessing), but I get a traversal
error unless I write something after the trailing colon

    return traversable.traverse(nm, further_path)
  File "/home/jmo/Zope3/src/zope/app/container/", line 100,
in traverse
    raise TraversalError(name)
TraversalError: 'displayable:'

note that the 'IDisplayable' adapter does not implement ITraversable,
but it implements IPathAdapter

class Displayable(object):
    """This adapter makes elements displayable.
    implements(IDisplayable, IPathAdapter)

    def __init__(self, context):
        self.context = context

    def getDisplay(...):

adapter ZCML declaration:


so either it is a bug, or am I missing something?

Sounds like a bug.


Jim Fulton           mailto:[EMAIL PROTECTED]       Python Powered!
CTO                  (540) 361-1714  
Zope Corporation
Zope3-dev mailing list

Reply via email to