Code for a template to navigate back/forward in daily notes

What I’m trying to do

I use a template to cruate a daily note. I want to be able to click on the link and go back to the most recent note. Like if today is 2023.09.25 and I last wrote in a daily note 2023.09.23 I want to go to that day spesificly. So skip the non existing days.
How do I make a navigation buttons for the previos/next daily entries?

Things I have tried

At the moment I am using this code:

<< [[<% tp.date.now(“YYYY-MM-DD”, -1) %>]] - [[<% tp.date.now(“YYYY-MM-DD”, 1) %>]] >>

In my template.
To show me the day before and the next day. But I don’t always have every daily notes and that is my problem. I want code for my template that would generate a link to existing daily notes.

Any suggestions? I tried reading on my own, but didn’t find much that could help. I realy want to have this configured so I can have a pace of mind and go to the next problem.

If you have the advanced URI plugin, you can use the link to the commands “Next daily note” and “Previous Daily note” and paste this link like this :

<< [previous](obsidian://advanced-uri?vault=Base_de_connaissance&commandid=daily-notes%253Agoto-prev) - [next](obsidian://advanced-uri?vault=Base_de_connaissance&commandid=daily-notes%253Agoto-next)
1 Like

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