Template folder supporting * in path

My daily notes file structure:


How can apply my meeting templater to all folders

And the same for issue

I’d apply a template chooser to the /Daily folder, and then trigger the correct template from within that template.

Can you provide an example.

Thank You.

Sorry it took so long, it kind of slipped my mind, but if you’ve got the templates template_meeting and template_issue in your templates folder, then add another template like the one below:

  const baseFolder = tp.date.now("[/Daily/]YYYY[/]MM[-]MMM/")
  const datePart = tp.date.now()
  if ( tp.file.title.startsWith("Untitled") ) {
    const noteType = await tp.system.suggester((t) => t, ["meeting", "issue"])
    const newFilename =  baseFolder + noteType + "/" + noteType + "-" + datePart
    await tp.file.move(newFilename)
    tR = await tp.file.include(`[[f55538_${ noteType }]]`)

And attach as the new file template for the /Daily folder, and then each time you create a new file in there it’ll ask you if it’s a meeting or issue, and move the file to the correct place and insert the corresponding template.

I’ve set the baseFolder in an attempt to match your structure, and I’ve also opted for a proper date in the file name, so that file.day will get a value if you’re using Dataview queries later on.

Hopefully this’ll get you going, with choosing the type for the note and apply a matching template.

Can you explain that line to me.

i changed f55538_ to match my prefix for daily-meetings-template

This forum post is number 55538, so I use it to name test files and folders related to this particular thread, so you should indeed change that to match your prefix. Sorry, that I forgot to mention that.

And that line include the template of meeting or issue into the current file. It needs the “await” in front of it since this a file operation which take some time.

Finally when we’re in a Templater command template assign text to the tR variable is the way to append output to the file we’re working on.

1 Like

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