> How do I find out that iz is mounted to '/foo' in MyController itself?

Investigate the cherrypy._cputil.get_object_trail() function.

For example, here is how I generate a breadcrumb list in my CMS:

def breadcrumbs():
        cherry_trail = cherrypy._cputil.get_object_trail()
        href = '/'
        crumbs = [['/', 'Home']]
        for item in cherry_trail:
                if isinstance(item[1], RootController): continue
                
                if isinstance(item[1], Atom):
                        href = "%s%s/" % (href, item[0])
                        crumbs.append([href, item[1].q.title])
        
        crumbs[-1][0] = None
        return crumbs

It took me quite awhile to figure out how it works, as the few  
examples I've seen online are pretty obfuscated.

Matthew Bevan, Systems Administrator
Top Floor Computer Systems Ltd.



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to