[Zope-CMF] Breadcrumbs

Tres Seaver tseaver@palladion.com
Mon, 4 Jun 2001 09:08:14 -0400 (EDT)


On Mon, 4 Jun 2001, seb bacon wrote:

> * Tres Seaver <tseaver@palladion.com> [010604 04:27]:
> > Chris Withers wrote:
> > > Then, whenever you want an object's breadcrumbs, just do:
> > > 
> > > <dtml-var breadcrumbs>
> 
> > This is excellent! I folded it into a site I've been making "on the side"
> > for a church group; it looks wonderful. I did trim out the "portal_title"
> > bit, as it didn't feel as though it was adding value. Any reason I shouldn't
> > fold it into CMFDefault/skins/generic?
> 
> Perhaps it would be a good idea to add it to the UrlTool -
> e.g. <dtml-var "portal_url.breadcrumbs()">?  A bit more unwieldy to
> type but it keeps navigational logic in one place and makes that
> particular tool more useful ;-)

I had rather not make the tool responsible for generating
presentation;  instead, I might add a method to the URLTool:

  def listBreadCrumbs( self, context ):
      """
          Return a list of folders up to the CMFSite, suitable
          for generating a "breadcrumbs" list.
      """
      #...

and then add a 'breadcrumbs' DTML method (or PythonScript, but
I prefer to keep presentation in DTML or ZPT) which called it and
built the presentation.

Tres.
-- 
===============================================================
Tres Seaver                               tseaver@palladion.com