> [!column|flex no-title]
>> [!menu-dark-red|ttl-c] [[Obsidian TTRPG Tutorials]] / [[Templates]]
> [!column|4 no-title]
>> [!menu-green-1|ttl-c] [[Getting Started]]
>
>> [!menu-green-2|ttl-c] [[Plugin Tutorials]]
>
>> [!menu-green-3|ttl-c] [[Community Supported Games]]
>
>> [!menu-green-4|ttl-c] [[Obsidian TTRPG Tutorials/Templates/Templates\|Templates]]
> [!column|3 no-title]
>> [!patreon|ttl-c] [Patreon](https://www.patreon.com/JPlunkett) ([Starter Vault](https://www.patreon.com/posts/obsidian-patreon-96801399))
>
>> [!discord|ttl-c] [Obsidian TTRPG Community Discord](https://discord.gg/CdM9UCJdwU)
>
>> [!discord|ttl-c] [Obsidian Official Discord](https://discord.gg/8AF29UBUCa)
# Templates
Obsidian.md has powerful and flexible Template support.
> A common thing we hear from new users is Obsidian looks great, but I will never be able to remember all the code/syntax you guys are using...
Here's the secret though... we can't remember it either! The trick is to use the Templates plugin. Everytime we find something cool that requires some complex code/syntax we copy that code/syntax into a new note and save it as a template.
From that point on all we have to do is trigger the Template Menu from a note and select the template we want to use and the note is magically updated with the code/syntax that we have already forgotten how to do. Now all we need to do is modify the code/syntax to meet our current needs.
It's a simple and efficient way to get more out of the tool.
> [!tip]- Setup Instructions
> **Plugin Installation:** Templates is a Core Plugin which means it is built into Obsidian.md.
> Obsidian.md > Settings > Core Plugins > Templates > Enable
> Important: You must set a folder as your Templates folder before the plugin will work.
> Create a folder. I like to call mine `z_Templates` the `z_` will force the folder to sort to the very bottom of the file/folder tree out of the way.
> Obsidian.md > Settings > Core Plugins > Templates > Settings > Template folder location > `your folder name`
> You also need to set your hotkey.
> Obsidian.md > Settings > Hotkeys > Filter: Templates > Templates: Insert Template > Set Hot Key
>
> Now you can save notes into the `z_Templates` folder. Press your hot key and select a template to add to your current note.
> [!tip]- Video Tutorial
> 
## Example
> [!tip]- Example Template Use
> ![[Obsidian_GMCFkV4FOT.gif]]
I like to think about Templates as falling into 2x categories.
1. [[Templates#Functionality Templates|Functionality Templates]]
2. [[Templates#Note Templates|Note Templates]]
Obsidian comes with Template functionality using the Core Plugin called Templater. This offers basic template support. There is also a Community Plugin called Templater which expands beyond the basic functionality adding the ability to add scripting and automation to your Templates. To learn more about Templates, start with the tutorials linked below.
| Plugin Name | Tutorial Link | Purpose |
| --------------------------------------------------------------------------------------------------- | ------------------------------------ | -------------------------------------------------------------------- |
| Core Plugins > Templates | [[Templates]] | Default template support that is built into Obsidian.md |
| [Templater](obsidian://show-plugin?id=templater-obsidian) | [[Templater]] | More advanced Template functionality. |
### Functionality Templates
These are the templates I primarily use. They are templates that are designed to add specific functionality within a note. For example, if I want to add a Callout to my notes, I use my Callout Template. If I want to add a statblock to a note, I add my Monster Statblock note.
Here is a list of functionality templates that I use to give you some ideas. These use the basic Template Core Plugin.
| Template Name | Tutorial Link | Purpose |
| ---------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Callouts | [[Callout Templates]] | Create callout boxes to bring attention to specific parts of a note. Callouts are [included with Obsidian](https://help.obsidian.md/Editing+and+formatting/Callouts) but I like to create a Template to add each Callout type so I can press the Template hotkey and select the Callout I want to add. |
| Dataview Queries | [[Obsidian TTRPG Tutorials/Plugin Tutorials/Dataview/Dataview\|Dataview]] | It's only a matter of time before you stumble across a really cool Dataview query and a shorter period of time after that before you forget how to write the code for that Dataview Query. So everytime I find a useful Dataview Query; I add it to a template so that I can easily add that query to a future note. |
| Insert Plugin Syntax | | There are quite a few plugins that require specific syntax/code to work. The TTRPG Statblock or Obsidian Leaflet plugin for example both have very specific syntax requirements. I keep examples of that syntax in a template so that I can always press my Template hotkey and select `Insert Monster (TTRPG Statblock)` or perhaps `Insert Regional Map (Leaflet)`. Wherever you have code that you know you will both forget and want to use later... save it as a template. <br> <br> My most commonly used templates are: `Insert Monster (TTRPG Statblock)`, `Insert Custom Monster (TTRPG Statblock)`, `Insert Regional Map (Leaflet)`, `Insert Timeline Event (April's Timelines)`, `Insert Banner (ITS)`, `Insert Encounter (Initiative Tracker)` |
### Note Templates
These are the templates that define a layout for an entire note. This might be a template for an NPC or and Town or a Guild. Often these provide a layout for the Note with pre-determined headings and frontmatter. Often they will include more advanced functionality such as [[Obsidian TTRPG Tutorials/Plugin Tutorials/Dataview/Dataview|Dataview]] so that the note will interact automatically with other notes that have used the same Template.
You do not need to make your Templates technical. Many people go very deep with Templater and Dataview which can leave new users scratching their heads.
You might just make a note that is laid out the way you want with pre-determined headings that you can use to prompt you when filling out that note in the future.
| Plugins | Tutorial Link | Purpose |
| --------------------------------------------------------------------------------------------------- | ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------- |
| [Text Generator](obsidian://show-plugin?id=obsidian-textgenerator-plugin) | [[Text Generator]] | Text Generator is an AI plugin that allows you to send pre-formatted templates up to the AI Chat and return completed notes. |
| Core Plugins > Templates | [[Basic World Building Templates]] | A list of basic templates that add pre-determined structure to notes for various categories. |
| Templater, Buttons, DB-Folder, Dataview, ITS Theme | [[Josh's Templates]] | These are the templates I'm currently using. |
| [DB Folder](obsidian://show-plugin?id=dbfolder) <br> [Dataview](obsidian://show-plugin?id=dataview) | [[Bag of Tips - Terrific Templates]] | A series of videos showing how to create various templates using dataview and database folders. |