I’ve developed a custom theme for a knowledge base website that I’m working on - in the partial “footer.html” there’s a link that allows you to print the page. I use the default taxonomy “tags” to sort them in some fashion.
Is it possible in the footer.html partial to put an IF statement, where pages that are tagged with “private” display “this page cannot be printed”, but for all other pages regardless of tags it displays the print link.
{{ with .Params.tags }}
{{ if in . "private" }}
code displaying "this page cannot be printed"
{{ else }}
code displaying print link
{{ end }}
{{ end }}
I didn’t know you could access tags through .Params like that, the documentation makes it sound like it’s only intended for accessing site settings from the config file.