feat(widget): enable splitting Talks section into past and upcoming talks

See #721
This commit is contained in:
Bertrand Thierry authored and gcushen committed 2019-02-27 22:06:39 +00:00
1 parent a622c8d19f
commit ed8f04ea2f
2 files changed
+9 -1

No files matched your search

+3 -1
View File
@@ -28,7 +28,9 @@ subtitle = ""
category = ""
publication_type = ""
exclude_featured = false
exclude_past = false
exclude_future = false
[design]
# Toggle between the various page layout types.
# 1 = List
+6
View File
@@ -33,6 +33,12 @@
{{ if $st.Params.content.filters.exclude_featured }}
{{ $query = where $query "Params.featured" "!=" true }}
{{ end }}
{{ if $st.Params.content.filters.exclude_past }}
{{ $query = where $query "Date" "<=" now }}
{{ end }}
{{ if $st.Params.content.filters.exclude_future }}
{{ $query = where $query "Date" ">" now }}
{{ end }}
{{/* Sort (use Hugo default for now) */}}
{{/* $sort_by := "Date" */}}