{{ if ( eq ( .Scratch.Get "listMode" ) "log" ) }}

Diary

{{ range ( sort ( where $.Site.Data.films.log "date_completed" "!=" "" ) "date_completed" "desc" ) }} {{ with .date_added }}{{ time.Format "Jan 2, 2006" . }}{{ end }} {{ .title }} {{ with .release_date }}{{ time.Format "Jan 2, 2006" . }}{{ end }} {{- if .date_completed -}} {{- time.Format "Jan 2, 2006" .date_completed -}} {{- if .is_repeat }} ↻{{ end -}} {{- else -}} n/a {{- end -}} {{ end }}

Assorted

{{ range ( sort ( where $.Site.Data.films.log "date_completed" "" ) "title" "asc" ) }} {{ with .date_added }}{{ time.Format "Jan 2, 2006" . }}{{ end }} {{- with ( where ( where $.Site.Pages "Section" "films" ) "title" .title ) -}} {{ range . }} {{ end }} {{- end -}} {{ .title }} {{- with ( where ( where $.Site.Pages "Section" "films" ) "title" .title ) -}} {{- end -}} {{ with .release_date }}{{ time.Format "Jan 2, 2006" . }}{{ end }} {{- if .date_completed -}} {{- time.Format "Jan 2, 2006" .date_completed -}} {{- if .is_repeat }} ↻{{ end -}} {{- else -}} n/a {{- end -}} {{ end }} {{ else if ( eq ( .Scratch.Get "listMode" ) "wishlist" ) }} {{ range ( sort $.Site.Data.films.wishlist "title" "asc" ) }} {{ with .date_added }}{{ time.Format "Jan 2, 2006" . }}{{ end }} {{- with ( where ( where $.Site.Pages "Section" "films" ) "title" .title ) -}} {{ range . }} {{ end }} {{- end -}} {{ .title }} {{- with ( where ( where $.Site.Pages "Section" "films" ) "title" .title ) -}} {{- end -}} {{ with .release_date }}{{ time.Format "Jan 2, 2006" . }}{{ end }} {{- if .date_completed -}} {{- time.Format "Jan 2, 2006" .date_completed -}} {{- if .is_repeat }} ↻{{ end -}} {{- else -}} n/a {{- end -}} {{ end }} {{ end }}