I am a bit confused by how Go templates execute my templates. I have a base layout and I would like to pass a string variable, so my base template can execute another template based on the string variable I passed.
This works fine.
{{ template "anotherTemplate" . }}
This does not work fine.
{{ $another := "anotherTemplate" }}
{{ template $another . }}