Hi. I have a template called: Topic Template.
I have made several revisions to it.
The problem is that I have created around 200 notes using that or similar template (with no changes - it’s a series of dataview tables so it’s dynamic).
- I update the Topic Template.
- Then I delete the note Shoes - v1 (the v1 of the Topic template applied to Shoes) and then simply type [[Shoes (topic)]]
- Since I’m using a base note, simply clicking on [[Shoes (topic)]] will create Shoes v2 (v2 because I have updated the Topic Template)
The issue is that doing that is a major pain 200 times. Also, I’m sure I’m going to update the template in the future, so this process will be never-ending.
Is there a way to update everything at once?
If what you change is the queries, and not the markdown around the queries you could look into start using
dv.view(), see Codeblock Reference - Dataview
It can extract the query part out of the page.
If you’re changing the markdown of the page, it’s a different matter. That can’t be changed as easily, as long as you don’t use embeds. And then it becomes a matter of how identical are your pages?
Another option, could possibly be to use some patch tool to apply differential changes.
Hmm… shame… it would be nice if there was a way to bulk delete and re-create a set of pages.
If you’re fine with actually deleting and recreating the pages, then you can utilise tools such as the Templater plugin to do that.
I’m not sure what a for loop means. Can you please give me an example or a place where I can learn it.
A for loop is one of the basic building blocks of any(/most) given programming languages, and there are plenty of tutorials around on that topic.
Don’t think this forum is the place for that, though.
Are you tackling the issues related to your topic template correctly? Is there a better way to deal with updating that in the dust place?
Sadly, it’s hard to give proper advice besides what I’ve already said, based upon the info you’ve given.