I want to have a custom CSS class in my partial, that is taken from the id given to each page. So far, I came up with this: {{ with .Param "id" }}<div class="newsletterSignup newsletterSignup--{{ . }}"> {{ end }}
Is this the right way of doing it? If there is no id assigned to the page, will it break?
Thanks in advance.
Thanks @zwbetz ! I just edited my post to show the line I was writing. I think what I am struggling with is on how to write a conditional for it, if it has id print it like so, else print something else. Any tips?