There is no such solution, to such a complex idea. I deliberately left out any implementations of my ideas to allow for the OP to enter the stage again explaining what they really wanted, instead of proposing a halfway solution which might or might not apply to their situation.
I’m not going to enter into a debate on what the best generic solution is, as I don’t believe it exists, but here is the gist of three different additions/changes which all could be made to a daily template:
A call to dv.view()
Personally I’m using a call like `$= await dv.view("header.js") `
, which triggers a javascript which builds a header suitable for whatever note I inserted that segment into. The script will detect what kind of note it is inserted into, and build an appropriate header.
At any point in time, I can then change this script to suit my current style of what I want to to have in the header.
Embedding of a header file
As hinted to in my previous post a simpler solution which solves some of the same, would be to have ![[my header]]
at the top of your daily note, and then use that file to hold the header of your daily notes. One major downside to this, is that the embedded file doesn’t know the originating file, so it needs to be generic.
For some this might be a valid option, and would allow for the daily note to focus on the new existing bits and pieces related to that day in particular. And you could do simple queries within this file to allow for showing todays date, or listing open tasks.
You could also have it really simple, and just have the link, and use another file/query to update the link. It would still be simpler to maintain a query updating one file, rather than having a query update your entire vault.
Dynamic queries
You could also use inline queries, like @Rios suggested, but these tend to be outdated at some point in time, maybe due to you wanting a different output, or due to changes in Obsidian or the plugin executing the query. Then you’re left with doing global queries changing your files, which not everybody is comfortable with doing. And correctly so, global search-and-replace do need to handled carefully, as there are many pitfalls when doing so.
If you’re happy having this dependency in your daily note, you could use the following in your daily note to link to todays note:
`= link(dateformat(date(today), "yyyy-MM-dd"), "Today") `
And I’m yet again not posting a script to change anyone’s vault globally, as I don’t feel we got enough information to do so in a secure manner. There are just too many unknowns.
But either of the solutions above do need to either accept that daily notes before a given date has a different structure, and from here on we adhere to a different structure, or they need for some global changes to be made to older notes.
My advice before doing those global changes are to be very sure what you want to change to, and that the implications of those changes don’t lead to even more changes down the road.