[Zope] Hooking into traversal

Jonothan Farr jfarr@real.com
Fri, 3 Mar 2000 16:16:43 -0800


> I want to write an object that can be traversed by ZPublisher.  The
> goal is so I can write URLs like thingyForwarder/45/display, to get an
> object corresponding to thingy #45, and call its display() method.
>
> What's the Zope Zen way of doing this?  Implement an __of__ method for
> acquisition?  Implement a __bobo_traverse__ method?  Make
> thingyForwarder a Folderish object and implement all the folder
> methods?


I think __bobo_traverse__ will do what you want. You can look at the local file
system code in LocalFS.py as an example.

-jfarr

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Hi! I'm a signature virus.
Copy me into your .sig to join the fun!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~