Templates injecting dynamic dates (and placeholders/arguments)

in my template, I want to use something akin to the thing you get from the /today or /tomorrow commands

I want to create a template with a link to yesterday/tomorrow in one of the bullets, something like [[{yesterday}]] (that will be evaluated every time the template is used)

EDIT: now that I’ve created some of my own templates - I really think templates need to be parameterized and should also be able to use hooks, like arg0 or arg1 so I can “pre-embed” a template in another template, so when they are finally embedded on a page - the sub-templates with the parameters run

Hello, I wonder how to insert current time in templates, how to do it in Logseq? Thanks!

I found out by accident you can use <%time%> inside a template. Not sure what else is possible though. I ran into your question looking for exactly that :wink:

@TomBen found something here: https://logseq.github.io/#/page/Dynamic%20Variables maybe this helps :slight_smile:

Great, Thanks so much!

It’s been moved to Dynamic Variables

2 Likes

I believe this will not work reliably (for properties added to the page that you do not edit, at least) because Dynamic variables don’t get properly processed when used in templates #9892

It looks like YU000jp’s logseq plugin default-template to Automatically apply a page template will work (written in response to Extend default template functionality - Feedback / Feature Requests - Logseq.