[opencms-dev] bread crumbs
M Butcher
mbutcher at grcomputing.net
Thu Jul 17 23:37:01 CEST 2003
That depends on how you do the breadcrumbs.
Say your getting a file with this VFS path:
/news/entertainment/dining/restaurant_reviews.html
Now, if the breadcrumb trail should mirror the filesystem path (which is
the easiest method of organization, IMHO), then all you need to do is
get info about each of the parent directories, and produce something
like this:
[home] > News > Entertainment > Dining > Restaurant Reviews
So, you'll want to write a recursive method that will, given the current
file name, grab the title and URL of the parent.
A shortcut way might be to get substrings of the VFS path of the
requested resource until you get to the document root, and then get the
"title" parameter of each URL, which will give you something pretty to
display.
Does that make sense?
If you want to do bread-crumb tracking that does NOT mirror the
structure of the site... then you'll have to figure out a way to store
whatever map of the site you intend to apply, and use that (making sure
that it gets updated as the site changes).
Matt
On Thu, 2003-07-17 at 14:32, Pucky Loucks wrote:
> Can anyone point me in the direction to figure out how to implement
> bread crumbs with Version 5.0?
>
> Pucky Loucks
>
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://mail.opencms.org/mailman/listinfo/opencms-dev
--
M Butcher <mbutcher at grcomputing.net>
More information about the opencms-dev
mailing list