Variable Scoping Problem? Reference in TYPE not working

Hi,

I created a site base on blackburn template. My homepage (index) looks like this:

{{ partial "header.html" . }}

<div class="header">
  <h1>{{ .Title }}</h1>
  <h2>{{ .Site.Params.subtitle }}</h2>
</div>

<div class="content">
{{ range .Data.Pages }}
    {{if eq .Type "index" }}
        {{.Content}}
    {{end}}
{{ end }}

</div>

{{ partial "footer.html" . }}

I read about this workaround in the forum, this way I can have an index.md and use Markdown on my homepage. As you can see I am including the footer.html partial. It resides in the default partials directory.

For other pages, e.g. about.md or imprint, I created a layout dir which I called singlesite, which also includes a footer.html. Now, when I reference partial/singlesite/footer.html in partial/singlesite/single.html it does not work. The partial/singlesite/footer.html is identical to /partial/footer.html, /partial/single.html looks like this:

{{ partial "header.html" . }}

<div class="header">
  <h1>{{ .Title }}</h1>
  <h2>{{ .Description }}</h2>
</div>

<div class="content">
  {{ .Content }}
</div>

</div>

{{ partial “singlesite/footer.html" . }}

/partial/footer.html looks like this:

</div>
</div>
<script src="{{ .Site.BaseURL }}js/ui.js"></script>

<footer>

<div class="content">
{{ range .Data.Pages }}
    {{if eq .Type "footer" }}
        {{.Content}}
    {{end}}
{{ end }}
</div>

</footer>

{{ partial "google_analytics.html" . }}

</body>
</html>

Why is is not possible to reference the footer.md from partial/singlesite/footer.html ? Do I have to hand over another variable instead of “.” ? I am not a webdesigner, maybe there is something wrong with the context variable which I pass over? I am sure that /partial/singlesite/footer.html will be parsed, I checked this with some test statements, but the reference to my footer.md part does not seem to work, which works like a charm in the default /partials/footer.html:

<div class="content">
{{ range .Data.Pages }}
    {{if eq .Type “footer” }}
        {{.Content}}
    {{end}}
{{ end }}

My goal is to have one footer.md in /content which I can access from all of my layouts. Any hints?

Thanks!