Buttons plugin disappears when templater code is used inside

What I’m trying to do

I am trying to use templater code inside a button, however as soon as i type any templater code (confirmed to be working code) into one of my buttons, it disappears/does not render.

The end result should be a button, when clicked, it should use the “New - Daily Note” template and create a note inside “Daily Notes/2024*/May*”

*Variables from templater code <% tp.date.now(“YYYY”) %> & <% tp.date.now(“MMMM”) %>

Things I have tried

I confirmed that this is not something related to my settings in obsidian as I have tested with 2 new vaults located on 2 different machines to also confirm that it is not some setting on my device.

I installed only the Templater and Button add-ins to test.

See below also my code used in the button and the screenshot of the issue where it disappears.
I have also tried removing parts of the code and changing it, the error remains the same.
Confirmed that the template is correct, can be found and is working.

I can get the button to appear if I run the “Templater: Replace templates in the active file”
The button also works after i run this command, the issue however is that all my templater variables, become static values then and are no longer dynamic, defeating the purpose of the button.

Button Code:

```button
name New Daily Note
type note(<% tp.date.now("DD-MM-YYYY") %>) template
action New - Daily note
templater true
folder Daily Notes/<% tp.date.now("YYYY") %>/<% tp.date.now("MMMM") %>
color blue

Error - Disappeared

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.