forked from 00dani/lemoncurry
15 lines
323 B
Python
15 lines
323 B
Python
breadcrumbs = {}
|
|
|
|
|
|
def add(route, label=None, parent=None):
|
|
breadcrumbs[route] = {'label': label, 'route': route, 'parent': parent}
|
|
|
|
|
|
def find(route):
|
|
crumbs = []
|
|
while route:
|
|
crumb = breadcrumbs[route]
|
|
crumbs.append(crumb)
|
|
route = crumb['parent']
|
|
crumbs.reverse()
|
|
return crumbs
|