hi Alex,

I am now using this automatic breadcrumb function:


def breadcrumbs():
    "Create breadcrumb links for current request"
    # make links pretty by capitalizing and using 'home' instead of
'default'
    pretty = lambda s: s.replace('default', 'home').replace('_', '
').capitalize()
    menus = [A('Home', _href=URL(r=request, c='default', f='index'))]
    if request.controller != 'default':
        # add link to current controller
        menus.append(A(pretty(request.controller), _href=URL
(r=request, c=request.controller, f='index')))
    if request.function == 'index':
        # are at root of controller
        menus[-1] = pretty(request.controller)
    else:
        # are at function within controller
        menus.append(pretty(request.function))
    return XML(' > '.join(str(m) for m in menus))


Has anyone else got a system they can share?
Richard


On Aug 5, 10:48 am, Richard <richar...@gmail.com> wrote:
> On Jul 17, 10:52 am, Alex Fanjul <alex.fan...@gmail.com> wrote:
>
> > I agree with you Richard,
> > In deed, in statusbar there is already a "kind of breadcrumb" but
> > wihtout links...
>
> > A vote for this inbuild functionallity...
> > Otherwise, I bet that someone has a quick and simple idea to do this
> > with one function and getting the information from url app, controller,
> > function.
>
> hmm, doing it automatically from the URL might work for me if I plan
> it right.
> Does anyone else already have their own breadcrumb system?
>
> Richard
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to