{{ if ( eq ( .Scratch.Get "listMode" ) "log" ) }} {{ .Scratch.Set "filterCol" "Watched Date" }} {{ .Scratch.Set "filterDir" "desc" }} {{ else }} {{ .Scratch.Set "filterCol" "Name" }} {{ .Scratch.Set "filterDir" "asc" }} {{ end }} {{ range ( sort ( sort ( index $.Site.Data.films ( .Scratch.Get "listMode" ) ) "Name" "asc" ) ( .Scratch.Get "filterCol" ) ( .Scratch.Get "filterDir" ) ) }} {{ .Date }} {{- with ( where ( where $.Site.Pages "Section" "films" ) "Title" .Name ) -}} {{ range . }} {{ end }} {{- end -}} {{ .Name }} {{- with ( where ( where $.Site.Pages "Section" "films" ) "Title" .Name ) -}} {{- end -}} {{ .Year }} {{- if ( index . "Watched Date" ) -}} {{- index . "Watched Date" -}} {{- else -}} n/a {{- end -}} {{- if ( index . "Watched Date" ) -}} {{- if .Rewatch }}↻{{ end -}} {{- else -}} n/a {{- end -}} {{ end }}