Hi, is it somehow possible to use a partial with content from a Param (from the markdown file).
Basically trying to do this:
{{ partial “product-descriptions/{{ .Params.product_name }}.html” . }}
Thanks in advance for any help.
Hi, is it somehow possible to use a partial with content from a Param (from the markdown file).
Basically trying to do this:
{{ partial “product-descriptions/{{ .Params.product_name }}.html” . }}
Thanks in advance for any help.
Something like this:
{{ partial (printf “product-descriptions/%s.html” .Params.product_name) . }}
Hope I got the parens lined up correctly.
Thanks for the reply - With the example you gave I get:
error calling partial: partial "product-descriptions/%!s(<nil>).html" not found
The <nil>
is a clue that .Params.product_name
is not defined on the page.
Ah yes that template was using other markdown files as well - got it working now
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.