then write what you need to write outside the scope of the templater script, after %> swhere and if you need dynamic input you only add the wrapper around the dynamic parts…?
i think the problem is that the dashboard file is not a template so the templater script needs to be triggered
so what you want to accomplish should be done through dvjs, which will trigger on its own
<%+ – This syntax is most likely going to be unsupported in a soon to come version of Templater, due to its inconsistency to produce results. It should, in theory, expand the template whenever you switch to Reading mode, and not do anything will in an edit mode.
You’re most likely better of using some dataviewjs script to generate this link, or potentially a pure Dataview script (using the hash() function to keep it from randomising the note all the time).
The point being that since dataview query are meant to produce dynamic results all the time, when combined with producing something random you need to turn down the randomness a little related to often you want new random notes. The aforementioned hash() function can be used to produce a new random value every day/hour/… depending on the seed you give it, so that it’ll return a consistent value even when the query runs multiple times. Various methods to use this can be found in this forum.