I also noted in the discussion you linked to that the use of the dynamic Templater code may get deprecated at some point, so it was a good exercise (for me) to make the switch now.
FWIW, I have this at the start of every note. (It’s a combination of an Admonition callout and the info I had that showed date created, modified and file path - now updated to use Dataview.)
Yeah, <% tp.file.creation_date("") %> still works fine in Templater (as the creation date never changes), but after the dynamic commands ( <%+ ) stopped working, I thought: how much do I really switch to Reading mode to look at those anyway? Dataview for the win!
Hi guys,
I´m quite new to obsidian so apologize my question.
I had the same issue wiht the modified date and tried now your solution using Dataview, the coding
So, many plugins utilise the code block to enclose their query or input. This applies to tasks, dataview, admonition, and many others. A code block is a block of lines surrounded by three (or more) backticks, ```, (or tildes, ~~~).
These blocks are also used for presenting code from various programming languages, and I think why they are used for plugins is their ability to contain many lines of text, and a built-in feature for tagging the block with a name which is easy to get at and used by the markdown processor.
However, in this thread we’re not talking about just a query, but an inline query. This is a special case made to be used in line with text of a paragraph.
This requires a different syntax, and the base syntax is yet again inspired by the one used from presenting code within the paragraph, which is single backticks around the phrase, like `…`.
And finally to identify that code as an inline dataview query, that code phrase has to start with the equal sign, =, so it becomes: `=…`.