{{ if ( eq ( .Scratch.Get "listMode" ) "log" ) }} {{ .Scratch.Set "filterCol" "Date Read" }} {{ .Scratch.Set "filterDir" "desc" }} {{ else }} {{ .Scratch.Set "filterCol" "Title" }} {{ .Scratch.Set "filterDir" "asc" }} {{ end }} {{ range ( sort ( sort ( index $.Site.Data.books ( .Scratch.Get "listMode" ) ) "Title" "asc" ) ( .Scratch.Get "filterCol" ) ( .Scratch.Get "filterDir" ) ) }}