Browse Source

projects: Fix list of talks (#548)

- Sort list of talks by `time_start` rather than `date` (consistent with home page widget)
- Fix bug that made publications duplicate in talks list when there was no talk in a project
Serge Bibauw 7 years ago
parent
commit
2bc968b9c5
1 changed files with 2 additions and 2 deletions
  1. 2 2
      layouts/project/single.html

+ 2 - 2
layouts/project/single.html

@@ -49,11 +49,11 @@
       {{ end }}
 
       {{ $items := where (where .Site.RegularPages "Type" "talk") ".Params.projects" "intersect" (slice $project) }}
-      {{ $items := $items | union (where (where .Site.RegularPages "Type" "publication") ".Params.url_project" $project_path) }}
+      {{ $items := $items | union (where (where .Site.RegularPages "Type" "talk") ".Params.url_project" $project_path) }}
       {{ $talks_len := len $items }}
       {{ if ge $talks_len 1 }}
         <h2>{{ (i18n "talks") }}</h2>
-        {{ range $items }}
+        {{ range sort $items ".Params.time_start" "desc" }}
           {{ partial "talk_li_simple" . }}
         {{ end }}
       {{ end }}