GoBlog/templates/posttax.gohtml

14 lines
508 B
Plaintext

{{ define "posttax" }}
{{ $post := .Data }}
{{ $blog := .Blog }}
{{ range $i, $tax := $blog.Taxonomies }}
{{ $tvs := sort (ps $post $tax.Name) }}
{{ if gt (len $tvs) 0 }}
<p><b>{{ $tax.Title }}</b>:
{{ range $j, $tv := $tvs }}
<a class="p-category" rel="tag" href="{{ blogrelative $blog ( printf "/%s/%s" $tax.Name (urlize $tv) ) }}">{{ $tv }}</a>
{{ end }}
</p>
{{ end }}
{{ end }}
{{ end }}