3 ms·
On a side note, the docs don't seem to mention if this is possible but does anyone know how to use a template or set a default frontmatter (like created date) w
by raybb 1y ago
On a side note, the docs don't seem to mention if this is possible but does anyone know how to use a template or set a default frontmatter (like created date) when using the "new" button in a Base?
The solution I used before bases is eh... pretty hacky.
```meta-bind-js-view
{memory^inputText} as title
---
const toShow = context.bound.title || "TKTK";
const str = `\`\`\`meta-bind-button
label: New Project Idea - ${toShow}
icon: ""
hidden: false
class: ""
tooltip: ""
id: ""
style: primary
actions:
- type: templaterCreateNote
templateFile: Templates/Project.md
folderPath: Project Ideas
fileName: ${toShow}
openNote: true
\`\`\``;
return engine.markdown.create(str)
```
- deleted 1y ago[deleted]
- codethief 1y agoFYI On HackerNews you can use indentation (by 2 spaces) to indicate code snippets, not ```.
- alsetmusic 1y agoNot OP, but I didn't know that. Thank you.
- kepano 1y agoDefault template will be added in an upcoming version.