I am doing a refactor of an existing theme, and am very intrigued by using block templates.
However, it seems like I cannot call a partial inside of a template that is part of the block setup?
For example, I have layouts/_default/baseof.html
which has a bunch of stuff, and includes {{- block "main" . }} {{- end -}}
Then, inside my templates, I have something like this:
{{ define "main" }}
<div class = "row">
<div class = "col-md-12">
{{ if eq .File.BaseFileName "welcome"}}
{{ partial "welcome.html ."}}
{{ end }}
</div>
</div>
{{ end }}
If I replace {{ partial "welcome.html ."}}
with just some text, it works fine. But it never loads the content of the partial.
Can I not mix partials and block templates?