Simple file name templates with citekey that distinguish multiple notes per parent item #558
macrospecter
started this conversation in
Note Templates
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Template A
Mostly courtesy of windingwind, this gives the following name for the markdown file: "[citekey]-[number of note in series (1 if first note, 2 if second note, etc.].md."
${(noteItem.parentItem
? noteItem.parentItem.getField("citekey")
: "")}${
(()=>{
if(noteItem.parentItem){
return "-"+noteItem.parentItem.getNotes().length
}
else{
return ""
}
})()
}.md
Template B
This provides the following name for the file: "[citekey]-[tag assigned to note].md." This works for me because I usually just have one main note and I don't normally tag my notes (as opposed to their parent items), and so only assign a tag (could just be "2") in the event that I have a second note.
${(noteItem.parentItem
? noteItem.parentItem.getField("citekey")
: "")}${"*"}${noteItem.getTags().map((_t) => _t.tag)}.md
Beta Was this translation helpful? Give feedback.
All reactions