# How to add another template and set it as default?

**URL:** <https://org-roam.discourse.group/t/how-to-add-another-template-and-set-it-as-default/283>\
**Category:** Troubleshooting\
**Created:** [June 4, 2020, 1:04pm UTC](https://org-roam.discourse.group/t/how-to-add-another-template-and-set-it-as-default/283 "2020-06-04T13:04:16Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![roi.holtzman](https://avatars.discourse-cdn.com/v4/letter/r/f05b48/32.png) [@roi.holtzman](https://org-roam.discourse.group/u/roi.holtzman)\
**Post date:** [June 4, 2020, 1:04pm UTC](https://org-roam.discourse.group/t/how-to-add-another-template-and-set-it-as-default/283/1 "2020-06-04T13:04:16Z")

</div>

I am very new to org-roam (and quite new to emacs), so please forgive my ignorance.  
I want to add another template (which adds some more lines to the header), and set it as default.  
How can I do that? I saw the example in the docs, but it does not explain this (as far as I’ve understood).

---

<div class="post-metadata">

**Author:** ![zaeph](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/zaeph/32/764_2.png) [@zaeph](https://org-roam.discourse.group/u/zaeph)\
**Post date:** [June 4, 2020, 1:12pm UTC](https://org-roam.discourse.group/t/how-to-add-another-template-and-set-it-as-default/283/2 "2020-06-04T13:12:42Z")

</div>

You need to modify the variable `org-roam-capture-templates`:

```auto
(setq org-roam-capture-templates
      '(("d" "default" plain
         (function org-roam-capture--get-point)
         "%?"
         :file-name "%<%Y%m%d%H%M%S>-${slug}"
         :head "#+TITLE: ${title}\n#+CREATED: %U\n#+LAST_MODIFIED: %U\n\n"
         :unnarrowed t)
        ("D" "default copy" plain
         (function org-roam-capture--get-point)
         "%?"
         :file-name "%<%Y%m%d%H%M%S>-${slug}"
         :head "#+TITLE: ${title}\n#+CREATED: %U\n#+LAST_MODIFIED: %U\n\n"
         :unnarrowed t)))

```

---

<div class="post-metadata">

**Author:** ![bepolymathe](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/bepolymathe/32/688_2.png) [@bepolymathe](https://org-roam.discourse.group/u/bepolymathe)\
**Post date:** [June 12, 2020, 2:57pm UTC](https://org-roam.discourse.group/t/how-to-add-another-template-and-set-it-as-default/283/3 "2020-06-12T14:57:38Z")

</div>

Why would we need two identical templates?

---

<div class="post-metadata">

**Author:** ![zaeph](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/zaeph/32/764_2.png) [@zaeph](https://org-roam.discourse.group/u/zaeph)\
**Post date:** [June 12, 2020, 3:14pm UTC](https://org-roam.discourse.group/t/how-to-add-another-template-and-set-it-as-default/283/4 "2020-06-12T15:14:01Z")

</div>

It was a proof of concept to illustrate my point.

---

<div class="post-metadata">

**Author:** ![bepolymathe](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/bepolymathe/32/688_2.png) [@bepolymathe](https://org-roam.discourse.group/u/bepolymathe)\
**Post date:** [June 12, 2020, 3:14pm UTC](https://org-roam.discourse.group/t/how-to-add-another-template-and-set-it-as-default/283/5 "2020-06-12T15:14:42Z")

</div>

Ok thanks. Just to be sure 😉

---

<div class="post-metadata">

**Author:** ![viogp](https://avatars.discourse-cdn.com/v4/letter/v/eb9ed0/32.png) [@viogp](https://org-roam.discourse.group/u/viogp)\
**Post date:** [December 16, 2021, 6:07pm UTC](https://org-roam.discourse.group/t/how-to-add-another-template-and-set-it-as-default/283/6 "2021-12-16T18:07:29Z")

</div>

Hi,

I’m just starting with org-roam and I wanted the notes to have the title first in their name.

For such a modification, I tried the suggestion from @zaeph (copy pasting it into my .emacs), however when I use _org-roam-node-find_ to create a new node I keep getting the following message in the minibuffer:

“Template needs to specify ‘:target’”

Just in case it helps, this is the set up I have for org-roam:

```auto

;;; Set up Org-roam
(setq org-directory (concat (getenv "HOME") "/notes/"))
(use-package org-roam
  :after org
  :init (setq org-roam-v2-ack t) ;; Acknowledge V2 upgrade
  :custom
  (org-roam-directory (file-truename org-directory))
  :config
  (org-roam-setup)
  :bind (("C-c n f" . org-roam-node-find)
	 ("C-c n r" . org-roam-node-random)		    
	 (:map org-mode-map
	       (("C-c n i" . org-roam-node-insert)
		("C-c n o" . org-id-get-create)
		("C-c n t" . org-roam-tag-add)
		("C-c n a" . org-roam-alias-add)
		("C-c n l" . org-roam-buffer-toggle)))))

```

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [December 16, 2021, 8:43pm UTC](https://org-roam.discourse.group/t/how-to-add-another-template-and-set-it-as-default/283/7 "2021-12-16T20:43:01Z")

</div>

Where are your templates?  
It looks like the example by zaeph above were for v1 and no longer valid.

---

<div class="post-metadata">

**Author:** ![viogp](https://avatars.discourse-cdn.com/v4/letter/v/eb9ed0/32.png) [@viogp](https://org-roam.discourse.group/u/viogp)\
**Post date:** [December 16, 2021, 11:05pm UTC](https://org-roam.discourse.group/t/how-to-add-another-template-and-set-it-as-default/283/8 "2021-12-16T23:05:12Z")

</div>

Thanks for the quick response! I don’t have any templates of my own. I thought I could simply make some small changes following the example above. If I do need templates, could you point me to somewhere explaining this? The org-roam manual is very detailed but I get lost there and I didn’t find how to do the small changes I want. As these are small things, I can also live without them, though.

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [December 17, 2021, 8:47am UTC](https://org-roam.discourse.group/t/how-to-add-another-template-and-set-it-as-default/283/9 "2021-12-17T08:47:41Z")

</div>

I refer to the default one (`C-h v org-roam-capture-templates`) and adjust it. My change to the templates is very light, too, so I don’t know any good explanation.

Maybe this? (I haven’t read it but I only hear good things about System Crafters on Org-roam and Emacs tutorials):

[https://systemcrafters.net/build-a-second-brain-in-emacs/capturing-notes-efficiently/](https://systemcrafters.net/build-a-second-brain-in-emacs/capturing-notes-efficiently/)
