Hi
I know how to apply a partial to a specific page or post only in the basehml file but struggle to find out how to exclude a partial for a specific page.
Exemple : how to remove the footer partial only in the 404 page?
Hi
I know how to apply a partial to a specific page or post only in the basehml file but struggle to find out how to exclude a partial for a specific page.
Exemple : how to remove the footer partial only in the 404 page?
exclude = true
{{if .Params.exclude}}
do stuff
{{end}}
for the 404 you can change the logic in the 404 template
[EDIT] typo. Add .Params
Thanks for your answer. I saw this logic but the main issue is the “do stuff”. What I want Is to remove the header. How you would code this?
Here is how I would go about it:
{{ with .Params.exclude }}
<-- no header --->
{{ else }}
<--- header --->
{{ end }}