I have created a partial which creates a list of pages. I am using len
to determine how many pages are in the filter. I would like to exclude the Current Page.
This should look like:
{{ $range := where .Site.RegularPages "Page" "ne" .Page }}
However, this shows nothing when I do that. The only way I’ve found to make this work is by using .File.UniqueID
or .Permalink
. Why can’t you use the Page
variable in a filter?