# Capture Template only partially applied

**URL:** <https://org-roam.discourse.group/t/capture-template-only-partially-applied/388>\
**Category:** Troubleshooting\
**Created:** [June 16, 2020, 5:17am UTC](https://org-roam.discourse.group/t/capture-template-only-partially-applied/388 "2020-06-16T05:17:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ingorichter](https://avatars.discourse-cdn.com/v4/letter/i/71e660/32.png) [@ingorichter](https://org-roam.discourse.group/u/ingorichter)\
**Post date:** [June 16, 2020, 5:17am UTC](https://org-roam.discourse.group/t/capture-template-only-partially-applied/388/1 "2020-06-16T05:17:50Z")

</div>

Hello,

I defined a capture template to create a new entry from my browser. Everything works fine except that some of the properties defined in the head section are missing. I only get #+TITLE: and #+roam\_key:. Everything else is missing. Is my configuration correct or am I running into a bug here?

This is my configuration

```
  (use-package org-roam
    :hook
    (after-init . org-roam-mode)
    :custom
    (org-roam-directory "~/Nextcloud/org/roam")
    :bind (:map org-roam-mode-map
		(("C-c n l" . org-roam)
		 ("C-c n f" . org-roam-find-file)
		 ("C-c n g" . org-roam-show-graph))
		:map org-mode-map
		(("C-c n i" . org-roam-insert)))
    :config
    (setq org-roam-ref-capture-templates
	  '(("r" "ref" plain (function org-roam-capture--get-point)
	     "%?"
	     :file-name "websites/${slug}"
	     :head "#+TITLE: ${title}\n#+roam_key: ${ref}\n#+HUGO_SLUG: ${slug}\n#+roam_tags: website\n#+title: ${title}\n\n- source :: ${ref}\n"
	     :unnarrowed t)))

```

Does anyone have an idea why this is happening?

Thank you very much

---

<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 16, 2020, 5:32am UTC](https://org-roam.discourse.group/t/capture-template-only-partially-applied/388/2 "2020-06-16T05:32:45Z")

</div>

You’re modifying the wrong variable. For protocol-templates, you need to modify `org-roam-capture-ref-templates` (notice the **ref** ).

---

<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 16, 2020, 8:35am UTC](https://org-roam.discourse.group/t/capture-template-only-partially-applied/388/3 "2020-06-16T08:35:23Z")

</div>

For example…

```
(setq org-roam-capture-ref-templates
      '(("r" "ref" plain (function org-roam-capture--get-point)
         "%?"
         :file-name "web/${slug}"
         :head "#+TITLE: ${title}
#+ROAM_KEY: ${ref}
#+ROAM_ALIAS:
#+ROAM_TAGS:
#+CREATED: %u
#+LAST_MODIFIED: %U
- source :: ${ref}\n\n"
         :unnarrowed t)))
```

---

<div class="post-metadata">

**Author:** ![ingorichter](https://avatars.discourse-cdn.com/v4/letter/i/71e660/32.png) [@ingorichter](https://org-roam.discourse.group/u/ingorichter)\
**Post date:** [June 16, 2020, 4:43pm UTC](https://org-roam.discourse.group/t/capture-template-only-partially-applied/388/4 "2020-06-16T16:43:15Z")

</div>

Thank you for the clarification!  
I looked at some other configuration [https://github.com/jethrokuan/dots/blob/master/.doom.d/config.el#L462](https://github.com/jethrokuan/dots/blob/master/.doom.d/config.el#L462) and it seems the correct variable is org-roam-capture-ref-templates and not org-roam-ref-capture-templates.

I hope the person whose config I used is probably having the same issue…

Thanks!

---

<div class="post-metadata">

**Author:** ![jethro](https://avatars.discourse-cdn.com/v4/letter/j/b5a626/32.png) [@jethro](https://org-roam.discourse.group/u/jethro)\
**Post date:** [June 17, 2020, 6:55am UTC](https://org-roam.discourse.group/t/capture-template-only-partially-applied/388/5 "2020-06-17T06:55:20Z")

</div>

Yes 😃 that would be me, I’d changed it but didn’t push the updates up.
