Inserting a template vs. creating a new document with a template... #1228
Replies: 3 comments 1 reply
-
Well, you have more options, you can configure templater to open a specific template in a specific folder when you create a document there so that whenever you create a document in your cooking recipes folder it opens with the cooking recipes template. Another option is to create a unique and complex template to create a new note and that, through a suggester, allows you to choose what type of note you are going to create and when you choose type of note you create and if you choose, for example, recipes, it will load the recipes template. I currently have a separate folder with the templates, and another with the scripts (which can be .js or simple code in a new note) |
Beta Was this translation helpful? Give feedback.
-
I'd recommend prefixing your templates with the action you take with it, so you'd have a template called You could also update your template to support both modes. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the feedback!
In hind sight... actually there is no reason why I can't alter the behavior when inserting vs. creating new. Perhaps the 'person' template will just open a menu to insert a link to a person if I run it with insert, and if I run it with new it will create a new person. Similar for most of the other items. That's a great idea that I didn't think of!
In my case
~~I have a template that will insert a "section" by describing what the
section will look like - that makes sense to inject into a current page,
but doesn't really make sense to create a new page with - but it wound't
hurt either.
Other cases I have a template that will create a new "entity" - like a
person, project, place, event, etc. These items do not make sense to inject
into the current page.
I still appreciate your suggestions though! I did prefix the templates in
the manner that you suggested and so at least I'll know which work with
what mode - insert or create new.~~
…On Wed, Oct 18, 2023 at 8:31 PM Zach Young ***@***.***> wrote:
I'd recommend prefixing your templates with the action you take with it,
so you'd have a template called insert-person and one called create-person
.
You could also update your template to support both modes.
—
Reply to this email directly, view it on GitHub
<#1228 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEB5GSDBYJFTW6ENHYL42F3YAB7FJAVCNFSM6AAAAAA6ECR5NOVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TGMRRGMZDC>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Right now we have these two options:
They both appear to pull from the SAME template directory - which is setup in the options.
Idea:
Add an option to pull the insert templates from ONE folder while the create new note templates are pulled from a DIFFERENT folder.
Right now I have lots of code in my templates like this:
or
Depending on the run_mode value I crash out of the generation - by using console.fatal which is not a function - so it crashes. However, I need to remember sometimes which templates are which (I have a long list) and I wish I could just see the template I want based on the mode I want to execute - either create new document or insert into current.
Beta Was this translation helpful? Give feedback.
All reactions