Plugin: Create Notes from Templates

Is it possible to add the ability to have a default in a choice selection? For example I have a field defined as

Subscription Type: {{subscription type:choice:Streaming:Software}}

Would it be possible to have “Streaming” or “Software” preselected as the default?

This is probably a fringe use case but is it possible to put a frontmatter selection into the note body? For example, in the frontmatter I have


subscription-type: “{{subscription type:choice:Streaming:Software}}”

In the note I would like to reference subscription-type value from the frontmatter. How would I do this?

Thanks!

Hard code it in the template. If I had two similar topics I regularly created notes on, but a field varied between the two, I would make two near-identical templates with these fields hard coded in the template.

This was just a simple example, creating multi[le templates is not really feasable. If were just the two that would work.

For anyone else struggling with this you can easily get the value with templater scripting.

<% tp.frontmatter[“subscription-type”] %>

This may be a silly question…
How do I set the new note title to a auto timestamp?
I can’t make the currentdate work in any single way.
Thanks!

2 Likes

Me too. I cannot use the {{now:currentdate:dd-MM-yy}}

1 Like

hi all, any idea how I can debug the command palette not showing any relevant options other than “From Template: Re-index Template”.

Debug log shows it is finding the templates but they don’t show on the menu.

Got templates:  Templates/Zettelkasten/Book.md, Templates/Zettelkasten/Company.md, Templates/Zettelkasten/Course.md, Templates/Zettelkasten/ID.md, Templates/Zettelkasten/Create Anki card.md, Templates/Zettelkasten/Iframe.md, Templates/Zettelkasten/Lecture.md, Templates/Zettelkasten/Library.md, Templates/Zettelkasten/Month Tag.md, Templates/Zettelkasten/Note extraction.md, Templates/Zettelkasten/Note.md, Templates/Zettelkasten/Paper.md, Templates/Zettelkasten/People.md, Templates/Zettelkasten/Post.md, Templates/Zettelkasten/Product.md, Templates/Zettelkasten/Question split.md, Templates/Zettelkasten/Question.md, Templates/Zettelkasten/Quote File.md, Templates/Zettelkasten/Reading List.md, Templates/Zettelkasten/Resource.md, Templates/Zettelkasten/TODO.md, Templates/Zettelkasten/Tag.md, Templates/Zettelkasten/Term.md, Templates/Zettelkasten/Thought.md, Templates/Zettelkasten/Yearly Reading list.md, Templates/Zettelkasten/quote.md

Zettelkasten is set as the templates directory in the options.

Thanks!

So I’m wondering if it’s possible to:

  1. Remove default fields like {{title}}. I don’t have it listed anywhere in my template (I want to construct a custom title using an ID number. I could just use Title for the ID number but it’s not very descriptive.
  2. Change the order of the fields in the popup window?
  3. Parse one field to get variables to use for other fields?

Extra Credit: Remove certain characters from a field (i.e. so they can be used in the filename).

Also a slight bug. When creation of a file fails, it blocks input into the whole Obsidian app necessitating a restart of the app. Not a huge deal for me, but can be annoying.

I haven’t been able to get a template to work. I just want a fixed title to plus today’s title in the name of the note:

---
template-output: Life Plan Journal
tags: lifeplan
template-filename: {{now:currentdate:dd-MM-yyyy}} - Life Plan Journal
template-should-replace: "never"
template-should-create: "open-pane"
---

@mo-seph wondering if I could get some guidance after going through the docs, still not quite sure.

This thread looks like it has not been attended too in some time but… here we go.

I want to prompt for a project in the template and then use that as a part of the template output. My template (as well as the many others I have tried) does not work. Is tis possible? How would I accomplish what I want?


parent: [[[[Project MOC]]]]
type: project-page
project: “{{project-name:choice:ProjectA:ProjectB:ProjectC}}”
template-output: “Projects/{{project-name}}”
template-should-create: “open-pane”