So the wonderful @mentaloid created this for me Kit to automatically populate a block with content of parent block and it works great. What I would like to use this code in a template, but when I put {{pp property}} in the template, the function runs automatically. I would like for the function to run only after I use the template. I was thinking that, in the template I can put something like {{pp property}}
then when I insert the template, Logseq detects the pattern {{pp $1}}
(mind you it would have to be agile enough to work in spite of whichever property I choose to use) and then removes the triple backticks. But I am open to other solutions to this.
What you want is for the kit to abort execution when inside a template. That is possible by inserting in the javascript code-block the following line of code as second in order:
if (span.closest('.ls-block:has(a[data-ref=template])')) return
You may also opt to modify the macro by replacing the part $1:: parent
with anything or even deleting it.