mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-12 18:15:31 +00:00
talk widget: Add exclude_selected option to hide selected talks
Close #623
This commit is contained in:
1 parent
beaa10b674
commit
f1a32966f3
2 files changed
+10
-1
No files matched your search
@@ -18,5 +18,7 @@ count = 10
|
||||
# 1 = Detailed
|
||||
list_format = 0
|
||||
|
||||
# Exclude talks that are shown in the Selected Talks widget?
|
||||
exclude_selected = false
|
||||
+++
|
||||
|
||||
@@ -19,7 +19,14 @@
|
||||
<div class="col-xs-12 col-md-8">
|
||||
{{ with $page.Content }}<p>{{ . | markdownify }}</p>{{ end }}
|
||||
|
||||
{{ range first $page.Params.count (sort (where $.Site.RegularPages "Type" "talk") ".Params.time_start" "desc") }}
|
||||
{{ $.Scratch.Set "talks" (where $.Site.RegularPages "Type" "talk") }}
|
||||
|
||||
{{/* Exclude talks shown in Selected Talks widget? */}}
|
||||
{{ if $page.Params.exclude_selected }}
|
||||
{{ $.Scratch.Set "talks" (where ($.Scratch.Get "talks") ".Params.selected" "!=" true) }}
|
||||
{{ end }}
|
||||
|
||||
{{ range first $page.Params.count (sort ($.Scratch.Get "talks") ".Params.time_start" "desc") }}
|
||||
{{ if eq $page.Params.list_format 1 }}
|
||||
{{ partial "talk_li_detailed" . }}
|
||||
{{ else }}
|
||||
|
||||
Reference in new issue
Block a user