What is wrong with this code?

{{ if or (eq .Section "post") ($.IsHome) (eq .Kind "taxonomy") }}
        {{ range where .Data.Pages "Type" "page" }}
        <a href="{{ .Permalink }}">[ {{ .Title }} ]</a>
        {{ end }}

        {{ if .RSSLink }}
        <a href="{{ .RSSLink }}">[ RSS Feed ]</a>
        {{ end }}
{{ end }}

As you can see - Footer will be displayed for Homepage, for Single post and for Taxonomy. This works well.
In this Footer I want to list all single pages like “About”, “Contact” etc (all pages outside “post” directory). And here is a problem. It is listing pages only for Homepage. It is not listing them for Single post and Taxonomy page.
.RSSLink works properly everywhere.

.Data.Pages is contextual – i.e. it will be empty for regular pages.

What you want is probably (I’m guessing):

 {{ range where $.Site.RegularPages "Type" "page" }}
1 Like

You are right. Big thanks for help! I’m not sure if I will solve it alone :worried: