Bases: New With Template (for 'New' Button)

Use case or problem

I absolutely love the Bases feature. I love that I can make a list of files. I also love the “new” button at the top. However, with the current use, my workflow is add a new note, delete everything in the note, and replace with a template (because it won’t replace the properties therein).

Proposed solution

Please add a dropdown (or modifier to the button, like ctrl-button) to allow us to create with a template. It can auto tie into the core templates plugin, or the templater plugin. It would streamline the workflow and make it easier to add files to the list of the base. Thanks.

Current workaround (optional)

Right now, the only workaround I’m using, as previously stated, is to use the button, delete the contents, then add the template.

Thank you for your consideration.

81 Likes

This is a great suggestion and I have two recommended additions:

  1. It would be nice to be able to provide the default template(s) to be used with the ‘New’ Button. We could select the template in the GUI and that could be saved in the YAML .base file.
  2. It would be nice to be able to save where new files should be saved when we use the ‘New’ Button.
12 Likes

100% agreed! I came to the forum to post this feature suggestion, and I found this post. I’m glad someone else already mentioned it.

I also agree with @DandyLyons. I can totally see this setting being persisted in the YAML base file.

I have some additional notes:

  • Bases have different views. Each view can have significantly different properties and configurations, so it could be helpful to have the setting at the base level, with the option to override it per view. Imagine I have a Places category (as demonstrated in Kepano’s vault), and I use both Restaurant and Hotel templates. If I have one view for listing restaurants and another for hotels, I may want to trigger different templates when creating a new item.
  • The setting could support a list of templates rather than just one. For example, I might have a base Place template, plus specific ones for Restaurant and Hotel. Currently, applying multiple templates to a note merges the properties. Similarly, this setting could allow a list of templates to be applied in sequence, just like you would for a note.

Finally, and perhaps this deserves a separate ticket, it would be amazing to have an option to specify a default folder for new notes created from a base. Same idea: I store all “Places” notes in a /Places folder, but after clicking New, I still have to manually move the note to the correct location.

14 Likes

Yes, this would be great. At very least, it would be nice to set the available empty properties for the new button so it’s not just derived from the current view.

2 Likes

This is must have. Currently I’m using the templater plugin to create new notes with a hotkey, and then add tags manually that matches the tag for a base, which is not user friendly at all.

A possible solution might be an extended plugin-API that allows any plugin to register itself as a template provider. It should support per-bases-views which in-turn provides a way to a plugin to have different templates for: (1) template applied to all views, (2) view-specific templates. And then if a plugin is registered as a template provider it can be assigned as a default bases “new” template provider in the settings.

2 Likes

Yes, custom template per view would be the ticket for me!

2 Likes

As a workaround, I’m doing this:

  1. Removed the properties from my old templater template (it contains headlines and other structural items).
  2. Click “new” in the bases table.
  3. Bases adds the metadata into my new file
  4. Hit Ctrl-P “Templater: Open insert template modal” and select the template.

It’s then appended to the newly created file with the metadata according to bases.

  • 1 from me, great idea and would save a bit of time!
3 Likes

My workaround is to embed the base in a note and add a meta bind button above that creates a new note from a specific template

1 Like

Adding this feature would be a major improvement in the workflow! Assigning default templates to new entries of an object type in a database is a universal feature in object-based PKM like capacities and notion.

I have implemented a temporary solution to this using a plugin. This plugin listens for file creation and checks for an existing template property in the frontmatter, which we can set up to be “implied” from property filters. If it finds it, it applies the template content.

For more information, please see

Note that this implements @weppos 's requested features, as:

  • Filters can be set on the base level and overridden per view
  • Multiple templates can be linked in the template property filter

This needs to be a feature.

I also have this problem, and I was just looking for a solution on this forum.

would love this! was coming to suggest the same thing

It’s now possible if we set a filter for only files in a specific folder. Then new notes are created within that folder.

2 Likes

Bumping this again cause it would be great to have this!