The context is changing inside the loop. The global context ., which usually contains the the information about the page and site becomes the current element over that you are ranging.
This means your are passing an element of .Site.Params.fifty.element instead of the expected . that contains meta information.
Try the following:
{{ partial "detail" $. }} # note the $ before the .
$ represents the global context, .i.e. the expected context with the meta information.
Alternatively, store the global context in a variable outside the loop:
{{ $context := . }}
{{ range .Site.Params.fifty.element }}
...
ok thx for that working code: {{ partial "detail" $. }}
helped me out a lot.
second problem is: {{ range .Site.Params.fifty.element }} {{ $slug := .slug }} <div class="col-md-6 col-sm-12"> {{ partial .partial $ . }} </div> {{ end }}
how to get access to .slug or $slug inside the partial?