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