holroy
December 16, 2023, 5:44pm
2
We’ve touched in on this subject lately, and two of my responses with almost the same answer is given below. The trick is to defer showing the previous/next links until you show the note. This way you don’t need to change a link in an existing note, but just let the note itself discover which is the previous and next links.
I’m doing a similar thing in my daily notes, where each of the notes have the following line at the start of the note:
`$= await dv.view("js/header") `
This refers to a javascript file called within the dataview context, and in there I produce various headers for use in my daily notes. One of the elements it produces are previous and next links.
The algorithm I’m using to get these links is a query listing all the daily notes ordered by the date, and then I loop through them searching for the…
Use date: ... in your files
If you put a property called date with a proper date, you’ll be able to use file.day from within dataview and various other plugins. Then you’re free to do whatever you want with the title, and still make your queries be relative to the date of the note.
Possibly use dv.view()
In my daily note setup I’m also using something similar to what you’re aiming for, so my template inserts the following as the first line in my daily notes (and some other notes):
`$= await …