I have a simple shortcode of an external theme.
<div class="book-expand">
<span>{{ default "-1" (.Get 0) }}</span>
<span>{{ default "-1" (.Get 1) }}</span>
<div>
{{ .Inner | markdownify }}
</div>
</div>
I don’t intend to change it. It works great and I intend to expect it to update on the theme side.
But I need it in my layouts.
The logical way is to use partial
{{ partial "shortcodes/expand.html" (dict "0" "0" "1" "1" "Inner" . }}
But it can’t find the files because partial
has strict of sources. Am I right?
The second way is template
{{ template "shortcodes/expand.html" (dict "0" "0" "1" "1" "Inner" . }}
But template
doesn’t support Get
function. Why!?
It is so transparent and comfortable. I could use shortcodes from other vendors without modifying their code. Am I missing something?