From: Oleg Broytman Date: Sun, 8 Jun 2014 16:26:25 +0000 (+0400) Subject: Generate breadcrumbs X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=090d227e18bc2fe43ba7c63d0b241cddaaed07cc;p=phdru.name%2Fphdru.name.git Generate breadcrumbs --- 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