Skip to content
This repository was archived by the owner on Jul 21, 2019. It is now read-only.

Commit 9aed63e

Browse files
Merge pull request #658 from tgross/master
ensures speaker's multiple talks in a single event display
2 parents ead71fe + 694a38a commit 9aed63e

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

layouts/speaker/single.html

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@ <h2 class="speaker-page">{{ .Title }}</h2>
1616
<h3>{{ .Title }} at {{ $e.city }} {{$e.year}}</h3>
1717
<ul class="list-group">
1818
{{- $.Scratch.Set "speaker" .File.BaseFileName -}}
19-
20-
{{- $p := $.Site.GetPage (printf "events/%s/program/%s" $e.name ($.Scratch.Get "speaker")) -}}
21-
{{- if $p -}}
22-
{{- with $p -}}
19+
{{ range where (where $.Site.Pages "Type" "talk") ".Dir" "=" (print "events/" $e.name "/program/") }}
2320
<!-- Now we can display stuff! -->
2421
{{- range .Params.speakers -}}
2522
{{- if eq . ($.Scratch.Get "speaker") -}}
@@ -30,8 +27,7 @@ <h3>{{ .Title }} at {{ $e.city }} {{$e.year}}</h3>
3027
<a href = "{{ .Permalink | absURL }}" class= "list-group-item list-group-item-action">{{ .Title }}</a>
3128
{{ $.Scratch.Set "display" "false" }}
3229
{{- end -}}
33-
{{- end -}} <!-- end with -->
34-
{{- end -}} <!-- end if $p -->
30+
{{- end -}} <!-- end range where -->
3531
</ul>
3632
</div>
3733
</div>

0 commit comments

Comments
 (0)