def get_breadcrumb(s, n=0): depth = section.get_depth(s['path']) return [[s, get_breadcrumb(section.get(s['parent_path'])) if depth > n else []]]
def view_breadcrumb(self, params=None): n = int(params[0]) if params else 0 hierarchy = get_breadcrumb(section.get(self.section.path), n) self.section.css.append('nav-breadcrumb.css') return list_ul(self.section.path, hierarchy, 'breadcrumb')