From 090d227e18bc2fe43ba7c63d0b241cddaaed07cc Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sun, 8 Jun 2014 20:26:25 +0400 Subject: [PATCH] Generate breadcrumbs --- phd_site.tmpl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/phd_site.tmpl b/phd_site.tmpl index 6da679a..003c5b9 100644 --- a/phd_site.tmpl +++ b/phd_site.tmpl @@ -105,6 +105,15 @@ $style +

+#set $path_components = $path.split('/')[1:-1] +#set $breadcrumbs = ['phdru.name'] +#for $i in range(len($path_components)) +#set $subpath = '/'.join($path_components[:i+1]) +#silent $breadcrumbs.append('' + $path_components[i]+ '') +#end for +#echo " / ".join($breadcrumbs) +

$body #def link_tag($tag) $tag -- 2.39.5