Recent sightings of the use of __bobo_traverse__ in SkinScript gave me hope
of giving users a more useable breadcrumbs trail in the case where I have
nested specialists.

My TaskTemplates specialist is nested inside my RequestTypes specialist.
When I retrieve a dataskin from the RequestTypes specialist I have a tab
that lists TaskTemplates for that RequestType specialist.  Following a link
from the TaskTemplate list takes you to that instance.

Thus results in a url like this:
        /RequestTypes/<request type instance>/Task Templates/<task template
and what I ideally want is:
        /RequestTypes/<request type instance>/<task template instance>.

I read all the comments about __bobo_traverse__ and created a python method,
"traversal_method" inside the "RequestTypes" specialists.  I must admit that
I don't really understand Zope's traversal machinery yet and would
appreciate some guidance.

My SkinScript for RequestTypes:

WITH SELF COMPUTE __bobo_traverse_=traversal_method

My traversal_method:

ob = getattr(self, name)
if ob is not None:
  return ob
  ob = self.TaskTemplates.getItem(name)
  if ob is not None:
    return ob
  raise 'NotFound'

Any help would be greatly appreciated.


Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to