Browse Source
Adding sort_order parameter when sorting images in single.html. Defaults to the normal ascending order.pull/6/head
committed by
GitHub
1 changed files with 2 additions and 2 deletions
@ -1,6 +1,6 @@ |
|||
{{ define "main"}} |
|||
<ul class="grid" id="target"> |
|||
{{ $photos := sort (.Resources.ByType "image") (index .Params "sort_by" |default "Name") }} |
|||
{{ $photos := sort (.Resources.ByType "image") (index .Params "sort_by" |default "Name") (index .Params "sort_order" |default "asc") }} |
|||
{{- partial "photos.html" $photos -}} |
|||
</ul> |
|||
{{ end }} |
|||
Loading…
Reference in new issue