[Zope-CMF] Re: Re-working Breadcrumbs

Chris Withers chrisw@nipltd.com
Mon, 27 Aug 2001 19:25:27 +0100


(always CC the list in case someone else can help too)

> I'm sorry to bother you, but thought you might have a minute for a quick
> question about the "breadcrumbs" script you posted to the Zope-CMF list:
>
> I'm trying to extend your script a bit so that the breadcrumb string
> returned shows the Title of a folder (object) instead of just the id from
> the URL. I'm not quite sure how to do this...

try this:

object = context.portal_url.getPortalRoot() # not sure of the exact syntax
here
for step in steps:
  object = object[step]
  url = object.absolute_url()
  title = object.Title()
  breadcrumbs.append(pattern % (url,title)

cheers,

Chris

PS: This is quite an expensive method to execute, maybe someone has a better
one?