.IsHome returns false inside range

Pretty much just what the title says, this code will return false when rendered inside index.html.

Makes sense to me because I am going through a section of the site to fetch content, but felt like it might be worth to raise the flag.

{{ range where (.Site.GetPage "section" "story").Sections ".Params.options.unlisted" false | intersect (where .Site.Pages "Params.story_featured" "=" true) }}
{{ partial "story-card.html" . }}
{{ end }}

story-card.html:

<div class="
{{ if .IsHome }}
	col-md-4
	{{ else }}
	col-md-6
{{ end }}
col-lg-4
">

I think that you need to use the dollar sign in this case like $.IsHome or $.Page.IsHome

Tried both and it keeps giving out the same result. But your reasoning is sound, if I am inside a range or partial, the $ should have worked.

Also try if eq $.Permalink .IsHome and variations.

Didn’t work either. I guess the only workaround would be to pass a variable to the partial.