[Product-Developers] Custom traversal view?

Torkel Lyng torkel at reamedia.no
Tue Aug 30 11:47:27 UTC 2011


On Aug 30, 2011, at 1:24 PM, Torkel Lyng wrote:

> I'm trying to add a view for IPloneSiteRoot that changes the default traversal. I'm absolutely not sure on how to do this, so perhaps I'm getting in totally wrong.
> 
> What I am trying to achieve is something like this scenario:
> 
> I want to enter "http://myhost/site/@@custom/further/down/the/path" in the browser, @@custom should look up an object and traverse 'further/down/the/path'. What I've down
> this far is creating a browser view with implements zone.traversing.interfaces.ITraversable (def traverse(self, name, further_path)). When my traverse method is called the
> name is set to 'absolute_url' and further path is nothing. I want to have custom stay in the traversal path for subsequent requests (it does different things with the request object),
> how can I achieve such behavior?
> 
> _______________________________________________
> Product-Developers mailing list
> Product-Developers at lists.plone.org
> https://lists.plone.org/mailman/listinfo/plone-product-developers

I found my way out of it – using IPublishTraverse instead of ITraverse seems to give me a solution.


More information about the Product-Developers mailing list