chhoumann / quickadd

QuickAdd for Obsidian
https://quickadd.obsidian.guide
MIT License
1.48k stars 135 forks source link

Allow format syntax in template path input [FEATURE REQUEST] #620

Open RomanMunar opened 8 months ago

RomanMunar commented 8 months ago

I'm automating a way for me to dynamically add a collection.

/Games <- Collection Name /Games/Games.md <- Root File Templates/Games Template.md <- Template File for its items

The one above but games as dynamic function

Using Templates/{{value:collectionName}} Template.md as Template Path is resulting in an error Template file not found at path "Templates/{{value:collectionName}} Template.md".

RomanMunar commented 8 months ago

For those facing this, a Capture choice with the code below works just as fine. file path: Templates/{{value:collectionName}} Template.md capture format:

return await this.app.vault.readRaw(`Templates/${this.variables.collectionName} Template.md`)