What I’m trying to do
I’m trying to create a button that would prepend a template to my note at a specific line. I have a “Standups” note, and I want to add a button that would add a new “day” to it. Here’s how it looks:
The code for the button is:
name Add a Day
type line(8) template
action StandupDay
templater true
The problem is that the template flashes and immediately gets deleted upon clicking the button:
The template is as follows:
###### {{date}}
Plans
- <% tp.file.cursor() %>
Problems
-
My vault looks like this (truncated):
├───.obsidian
│ └───plugins
│ ├───advanced-cursors
│ ├───buttons
│ ├───calendar
│ ├───cm-editor-syntax-highlight-obsidian
│ ├───dataview
│ ├───obsidian-excalidraw-plugin
│ ├───oz-image-plugin
│ ├───recent-files-obsidian
│ ├───table-editor-obsidian
│ └───templater-obsidian
├───Excalidraw
│ └───.obsidian
│ └───plugins
│ ├───advanced-cursors
│ ├───calendar
│ ├───cm-editor-syntax-highlight-obsidian
│ ├───dataview
│ ├───nldates-obsidian
│ ├───obsidian-excalidraw-plugin
│ ├───omnisearch
│ ├───oz-image-plugin
│ ├───recent-files-obsidian
│ └───table-editor-obsidian
├───Templates
│ StandupDay.md
└───Tom
├───.obsidian
├───.trash
├───Hepta
│ Standups.md
I’m running Obsidian on Windows 11, with Obsidian version 1.3.7.
Things I have tried
I’ve also tried using the button without the templater true
parameters. Initially it said that the template is not found. I removed spaces from the template name, so now it kind of works without Templater, but I’d like to extend the template with some advanced features that only Templater offers.
I thought maybe it’s the Syncthing issue that’s syncing my vault across devices, but it also happens when I turn off Syncthing.
My Android device says "Couldn’t find the specified template, please check and try again.