Including my yearly file's goals section inside every weekly file using templater?

What I’m trying to do

I have a yearly file called “2023”, which has a “#Goals” heading, I’m trying to setup my weekly template so that every weekly template has the Goals attached to the top of the file. The weekly files are called “2023-W01”, “2023-W02” etc.


You could link to the header in your weekly template using something like [[2023^Goals|Yearly Goals]] - when you hover the link you would see the goals

Not sure if its possible to pull in data from another file neatly unless you use a query

This sounds like a job for Dataview.

Repo of Dataview
Or see for example:
Daily and Weekly Reviews + dataview

Then you could include something like this:

FROM "your_weekly_review_folder"
WHERE contains(tags,"Goals")
SORT asc file.mtime

This particular example would have you include a tag with the term Goals in it. The LIMIT & SORT are optional, and FROM & WHERE only narrow your query. The capitalisation isn’t mandatory, I just like to keep things sorted and clear for myself.

I admit Dataview is its own rabbithole with a bit of a steep learning curve, but once you have a hang of things, things like what you ascribe above are very quickly accomplished. If I’m studying, I will include lists or tables with what progress I made from note in different folders, on different subjects. The hard stuff is somewhat beyond me still, I use dataviewJS rarely. But the regular dataview-code is not that hard.

The maker, @blacksmithgu, explains really well in this video. For starters, there is a very exiting video by Nicole van der Hoeven.

If I am more focused, I might come up with an answer in Templater for your question. Or maybe others will. Cheers

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