Compare commits

..

No commits in common. "d94e08674ff323dce55b93b39166cac1f80a2624" and "24db0f2f7da4484315422ff3e9870a4a709a6b79" have entirely different histories.

2 changed files with 3 additions and 13 deletions

View file

@ -5,19 +5,9 @@
{{- $pgr = (where $pgr "Params.categories" "intersect" (slice .)) -}}
{{- end -}}
{{- end -}}
{{- if (ne (.Get "order") "") -}}
{{- $order := split (.Get "order") " " -}}
{{- if (eq (index $order 0) "alpha" ) -}}
{{- if (eq (.Get "order") "alpha" ) -}}
{{- $pgr = $pgr.ByLinkTitle -}}
{{- else if (eq (index $order 0) "date" ) -}}
{{- $pgr = $pgr.ByDate -}}
{{- end -}}
{{- if (and (eq (len $order) 2) (eq (index $order 1) "desc")) -}}
{{- $pgr = $pgr.Reverse -}}
{{- end -}}
{{- end -}}
<ul class="postlist">
{{ range $pgr }}
{{- if (ne .LinkTitle "") -}}

View file

@ -1,5 +1,5 @@
{
"version": "1.1.0",
"version": "1.0.0",
"title": "Postlist",
"description": "Shortcode for dynamically adding a list of posts",
"includes": [