Proper Syntax for Filepath with Buttons Plugin

The Problem

TLDR I want to append a template to a file using the Buttons plugin, but I can’t figure out how to format my filepath to the template.

the error message
image

the button
image

my folder setup

documentation(?)
image

Formats I’ve tried

  • “add-section” (like documentation?)
  • “add-section.md”
  • I moved the file to “digitalRoads” to test if maybe the spaces in “Logs & Notes” was the issue. Then wrote as “digitalRoads/add-section.md”. Did not work… also spaces work everywhere else so I don’t think this is the problem
  • “digitalRoads/Logs & Notes/mind/entries/template/add-section”
  • “digitalRoads/Logs & Notes/mind/entries/template/add-section/”
  • “digitalRoads/Logs & Notes/mind/entries/template/add-section.md” This is the one my brain feels like should work
  • “digitalRoadskeeping/digitalRoads/Logs & Notes/mind/entries/template/add-section”
  • “digitalRoadskeeping/digitalRoads/Logs & Notes/mind/entries/template/add-section.md”

Some Background

In my Journal index, I have a button that will create a new entry in my “2023” folder using the template in the screenshot, “blank-entry.md”. The command to create a new file and use this particular template is setup using QuickAdd. I could just set Buttons to use the QuickAdd command and it works great.

The output looks like:

Unfortunately QuickAdd doesn’t have an append option for inserting templates. (To my understanding, not sure how to use Macros, I don’t know Javascript.)

Ideally

The space under the time heading is for writing my thoughts. Then if I come back within the same day to add more, I’d like the button to

  • Add the time
  • Set cursor to the line below that
  • Either that content is always added above the button, or that button is destroyed and a new one replaces it.

Here’s what add-section.md looks like:
image

Other Things I’ve Tried

  • Using the append text function of Buttons instead of having the template in its own note. The Templator commands do not automatically render doing this. More clicks no bueno.
  • tbh I fiddled a lot, I don’t remember…

In your folder image you say “mind/Journal/entries”, but in the examples you only say “mind/entries”. Could it be as simple as adding in “Journal/” ?

hey thanks for replying,
I just typoed the post because none of those worked with journal either.
All is well because I learned some javascript on youtube and got this working via calling the custom tp command in QuickAdd’s “capture” section. The button works with that instead.

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