Hi,
I thought I could use partials to return a block of text, but I realized I could not, because I want to return the text of the partial itself (after processing, of course).
To be more precise, I need to generate the following whenever certain links are encountered:
<input type="checkbox" id="{{$hash}}"/>
<dialog open>
<form method="dialog"><span role=heading>{{partial "docs/title-menu.html" $page}}</span><button>X</button></form>
<iframe role=article src="{{$destination}}" allowfullscreen allow-same-origin seamless></iframe>
</dialog>
But to work input must be at the same level or higher on the DOM tree as the label element which will take place of the normal link, because I am NOT using javascript.
I had another method with spans instead of dialogs, but while it had the advantage of not disrupting paragraphs, the code was messier.
I can’t begin to imagine how to scram all that into arguments for printf. So I would love to store this in a Scratch variable to pour under my article
tag. Something like:
{{ .Scratch.Add “list-dialogs” (partial dialog .) }}
thanks