Breadcrumbs in CherryPY 3.x

33 views
Skip to first unread message

Voltron

unread,
Jun 21, 2009, 4:50:26 PM6/21/09
to cherrypy-users
Is there a way to implement a breadcrumb generator in CherryPy 3? I
read somewhere that in version 2.x one could use a function in the
_cputils lib for this before, but this function is not present anymore
in the latest versions of CherryPY.


Thanks

Lakin Wecker

unread,
Jun 21, 2009, 6:08:32 PM6/21/09
to cherryp...@googlegroups.com
That depends on the type of breadcrumbs you are looking for. If
you're looking for the type that shows the user where they were last,
then you're better off just letting the browser do it's job with the
back button.

If you're looking for the concept of a container of the current path,
and all of it's parent containers, then your path should hopefully be
all you need for the bread crumbs, for instance, on
/blogs/a-better-kind-of-angry hopefully the breadcrumbs are / (home)
> /blogs (blogs) > /blogs/a-better-kind-of-angry (A better kind of
angry).

In that case, just use request.path_info.split("/").

If that's not what you're looking for, then you'll have to do a better
job of explaining what you are looking fore before we can answer your
question.

Lakin
Reply all
Reply to author
Forward
0 new messages