With the Templater plugin’s new syntax, I’m trying to emulate the old {{tp_title_picture}} behaviour (generate an unsplash.com image link based on the note’s title).
How would I do this? Or other "nested" Templater commands?
I think this question is of general interest, because the new syntax allows for easy use of parameters, which in turn might come from other Templater variables or functions.
In general, the new syntax took away a little (memorized) ease-of-use, but I like the new more structured approach in spite of making the learning curve steeper. It will allow for much more template functionality.
The text was updated successfully, but these errors were encountered:
Hey @Moonbase59, you can nest variables and functions if you want.
Because you already declared a command using <% and %>, you don't have to re-declare it.
The correct syntax for what you'd like to do is:
See also https://forum.obsidian.md/t/templater-plugin-new-syntax-emulate-tp-title-picture/16324.
With the Templater plugin’s new syntax, I’m trying to emulate the old
{{tp_title_picture}}behaviour (generate an unsplash.com image link based on the note’s title).I tried both
but it seems Templater cannot handle nested variables/functions.
Non-nested calls like
work fine.
How would I do this? Or other "nested" Templater commands?
I think this question is of general interest, because the new syntax allows for easy use of parameters, which in turn might come from other Templater variables or functions.
In general, the new syntax took away a little (memorized) ease-of-use, but I like the new more structured approach in spite of making the learning curve steeper. It will allow for much more template functionality.
The text was updated successfully, but these errors were encountered: