I have a very basic question and fairly new to Hugo and unsure of my syntax:
I want to be able to call a different partial (in this case a different header.html) depending on a possible taxonomy (ie a tag or category) but they all exist in one section (ie posts). So far I have this but it doesn’t work.
{{ if in .Params.tags "film" }}{{ partial "header-film.html" . }}{{ end }}
{{ if in .Params.tags "album" }}{{ partial "header-albums.html" . }}{{ end }}
<section id="main">
<div>
{{ .Content }}
</div>
</section>
{{ partial "footer.html" . }}
In my actual .md files I have something like this
+++
title = "This is my title for an album"
draft = true
date = "2017-01-02T14:42:03+11:00"
tags = "album"
+++
+++
title = "This is my title for a film"
draft = true
date = "2017-01-02T14:42:03+11:00"
tags = "film"
+++
Apologies if this is very 101. Any help would be greatly appreciated.