# Is it possible to auto update a template acrossed multiple notes?

**URL:** <https://forum.obsidian.md/t/is-it-possible-to-auto-update-a-template-acrossed-multiple-notes/94840>\
**Category:** Help\
**Tags:** templates\
**Created:** [January 14, 2025, 11:18pm UTC](https://forum.obsidian.md/t/is-it-possible-to-auto-update-a-template-acrossed-multiple-notes/94840 "2025-01-14T23:18:02Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Strike\_Gundam](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/s/958977/32.png) [@Strike\_Gundam](https://forum.obsidian.md/u/Strike_Gundam)\
**Post date:** [January 14, 2025, 11:18pm UTC](https://forum.obsidian.md/t/is-it-possible-to-auto-update-a-template-acrossed-multiple-notes/94840/1 "2025-01-14T23:18:02Z")

</div>

What I mean is I have a template, that is used a crossed multiple notes, if I need to update it then I have to go through every single note that uses that template. So is there a way to auto update every note that uses that specific template? When I try to look this up, I mainly use auto creating templates, but that’s not what I’m looking for. I need a way to auto update notes that have Template: (name here), not all other templates. Just the ones that have a specific name. Similar to how dokuwiki does.

---

<div class="post-metadata">

**Author:** ![cheezopath](https://forum.obsidian.md/user_avatar/forum.obsidian.md/cheezopath/32/33683_2.png) [@cheezopath](https://forum.obsidian.md/u/cheezopath)\
**Post date:** [January 14, 2025, 11:56pm UTC](https://forum.obsidian.md/t/is-it-possible-to-auto-update-a-template-acrossed-multiple-notes/94840/2 "2025-01-14T23:56:28Z")

</div>

i think you can do this with dataview and dataview publisher.  
use dataviewjs to render the template contents and then dataview publisher to stamp it into the files in an update operation. any time you tweak the template and re-run dataview publisher update, the files you’ve specified for dataview publisher will run an update.

if you just want to see the template in the file, you could do an embed instead.

---

<div class="post-metadata">

**Author:** ![Strike\_Gundam](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/s/958977/32.png) [@Strike\_Gundam](https://forum.obsidian.md/u/Strike_Gundam)\
**Post date:** [January 15, 2025, 12:21am UTC](https://forum.obsidian.md/t/is-it-possible-to-auto-update-a-template-acrossed-multiple-notes/94840/3 "2025-01-15T00:21:24Z")

</div>

How would I do the dataview thing? I’ve never touched it.

---

<div class="post-metadata">

**Author:** ![cheezopath](https://forum.obsidian.md/user_avatar/forum.obsidian.md/cheezopath/32/33683_2.png) [@cheezopath](https://forum.obsidian.md/u/cheezopath)\
**Post date:** [January 15, 2025, 1:29am UTC](https://forum.obsidian.md/t/is-it-possible-to-auto-update-a-template-acrossed-multiple-notes/94840/4 "2025-01-15T01:29:30Z")

</div>

for example, in a large portion of my notes, I have this code:

````auto
> [!QUOTE]+ `=this.file.name`
> ```dataviewjs
> await dv.view("scripts/header")
> ```

````

With dataview installed, it executes the code that’s in scripts/header.js (and in this case, renders it in a callout that bears the same name as the current note).

That header.js file can contain a lot of complex stuff, or it could be something as simple as `dv.paragraph("hello")`.

The advantage of this approach is you can update what shows up in each note all from that one js file, and it can even vary per note by looking at the metadata of the note it was launched from.

if all you need from this repeating template is to be shown the same thing in each note, that’s the way I’d do it.

If it’s necessary to have a template that you then want to be able to modify per note, that becomes more difficult.

Basically it comes down to what you want to be able to do.

Again, this may be overkill, and you might get what you need simply by using embeds/section embeds, like `![[my template#my section]]`

---

<div class="post-metadata">

**Author:** ![holroy](https://forum.obsidian.md/user_avatar/forum.obsidian.md/holroy/32/77699_2.png) [@holroy](https://forum.obsidian.md/u/holroy)\
**Post date:** [January 15, 2025, 11:12pm UTC](https://forum.obsidian.md/t/is-it-possible-to-auto-update-a-template-acrossed-multiple-notes/94840/5 "2025-01-15T23:12:08Z")

</div>

If you’ve created a file in the past based upon a template, then the train had left the station. There is no turning back from expanding/instantiating a template.

If that’s the case you’ve got to resort to search-and-replace across those files.

That’s why it’s usually in many scenarios (publish excluded) a much better option to use some dynamic query, like `dv.view()`, to produce dynamic portion of your notes.

---

<div class="post-metadata">

**Author:** ![Strike\_Gundam](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/s/958977/32.png) [@Strike\_Gundam](https://forum.obsidian.md/u/Strike_Gundam)\
**Post date:** [January 26, 2025, 11:43pm UTC](https://forum.obsidian.md/t/is-it-possible-to-auto-update-a-template-acrossed-multiple-notes/94840/6 "2025-01-26T23:43:17Z")

</div>

Cant seem to get the dataview one to work, but the ![page] seems to work. By “my section” do you mean linking to a header? The only downside I’ve found is that weird red line that appears on the top, and there doesn’t seem to be a way to have it reader as if in reading move while the note that the template is on is in live preview mode or to have it moved to the left. Do you know if there is a way to remove/hide the page title?

---

<div class="post-metadata">

**Author:** ![cheezopath](https://forum.obsidian.md/user_avatar/forum.obsidian.md/cheezopath/32/33683_2.png) [@cheezopath](https://forum.obsidian.md/u/cheezopath)\
**Post date:** [January 26, 2025, 11:49pm UTC](https://forum.obsidian.md/t/is-it-possible-to-auto-update-a-template-acrossed-multiple-notes/94840/7 "2025-01-26T23:49:36Z")

</div>

I think this thread covers removing embedded headers:

> [@Headerless Transclusions](https://forum.obsidian.md/t/headerless-transclusions/50241):
>
> Hi all, I’ve been wondering for a while how to write custom CSS to render transclusions without titles, and especially without headers if linking to a section in a note. There used to be a thread on this forum, but it’s been closed, and none of the solutions there were working anymore. So today, I’ve finally figured out how to do it properly, including making sure that only the first heading or the title are hidden, but other headings are still visible. As a bonus, this CSS also displays the s…

---

<div class="post-metadata">

**Author:** ![system](https://forum.obsidian.md/uploads/default/original/3X/b/e/bec35fbd23ab28909bb6bfe62cb32eb82dd34019.png) [@system](https://forum.obsidian.md/u/system)\
**Post date:** [April 26, 2025, 11:49pm UTC](https://forum.obsidian.md/t/is-it-possible-to-auto-update-a-template-acrossed-multiple-notes/94840/8 "2025-04-26T23:49:41Z")

</div>

Closed on April 26, 2025, 11:49pm UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
