Specifying note title and tags in templates

I think the naming template_ for special variables of the plugin is a good choice.

Not for tags, because they can no longer be made dynamic.
For the title possible, but could look a bit confused in the overview, but to make it consistent I would also put it in the YAML area and at most if none is defined use the title of the template.

1 Like

Will something like this work now?

note_title: Sprint {{bowm}}

By now, do you mean when this feature is implemented? If yes, then yes.

1 Like

Maybe I don't fully understand, but this seems a little overengineered to me. Why not just allow variables in titles and be done with it? By simply allowing template variables (one to many) in titles, you effectively accomplish the same thing without the need for special reserved variables.

1 Like

Actually, we have to do the same tags and maybe in the future for target notebooks (you can read this). If we want to do it for title only then using the template note title seems good.

I like this as a solve - if the user doesn't have a template_title or template_tags in their yaml, it uses the one from the template itself, otherwise the yaml overrides. Although I am guessing the "template" tag itself would not be inherited :slight_smile:

1 Like

I don't like it when all the variables appear in the template selection.
In addition, I would find it great if the templates are called differently than the created note then, especially for the dropdown selection are speaking names more meaningful.

  • Project meeting
  • Project ToDo
  • ...

and not

  • Standup {{bowm}}
  • Meeting {{project}} on {{date}}
  • {{project}} - {{taskdescription}}

Maybe you should consider to put the note options and the variables in their own section, so that there are no name overlaps?

variables:
  name: text
  project: enum(Project 1, Project 2)
  notebook: text
  tags: text
  test:
    label: Text for the input mask
    type: text
    ...
note:
  tags: daily, {{tags}}
  title: Meeting project {{project}} on {{date}}
  notebook: {{project}}
  ...
3 Likes
1 Like

I was looking for a way to batch/bulk create notes and read all the plugin suggestions.

Then I thought maybe if the template plugin could create a note for all permutations of a variable? For example "Day of the Week Number" creates 7 notes. Or for a range, for example "Week Number 23 to 28" creates 6 notes.

("Proceding with caution" caveats etc because it could spawn 100 notes if done wrong)

Could come in handy for this also:

Thatā€™s a nice use case. But I am unable to think of a good way to implement this. I think it will be too confusing for a large number of users and yes as you mentioned it will be frustrating if it doesnā€™t behave the way they expected it to because it could create 100s of wrong notes.

But maybe, we can create a new plugin that works with template plugin to do batch creation. I am not sure if the commands registered by template plugin can be used by other plugins.

2 Likes

Yeah was also thinking a combo is more feasible.

A note generator for batch creation.
But being able to choose on which template it is based.

Passing on the same variables tho for titles etc still remains like you said.

I'm getting the same error as @dpoulton but after readfing this entire thread I'm still confused.

Created a template with the following at the beginning:


MaandNaam: dropdown(Januari, Februari, Maart, April, Mei, Juni, Juli, augustus, September, Oktober, November, December)
MaandNr: dropdown (01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, 12)
template_title: 2021{{MaandNr}} - {{MaandNaam}} - Routine


For non-dutch, it is trying to create a title with monthname (january to december) and month number (01 to 12).
The name is used exactly as expected but the 'text' 01 etc says invalid type and is ignored.

What am I missing?

If that is the exact copy and pasted text, it's because you have a space between dropdown and (

MaandNr: dropdown (01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, 12)

should be

MaandNr: dropdown(01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, 12)
1 Like

Ahhhh, thanks!!! Stupid mistake. :innocent::grin: