Link that generates templated note

What I’m trying to do

I’m trying to create a dashboard. It has been mostly compromises and trying to come up with ways to get what I wanted to be accomplished. Right now, I’m using the dashboard++.css to get a look like this.

I have a daily, weekly, monthly, etc. note set up using periodic notes. I’m trying to find a way to have links for this on my dashboard set up for the current day, month, week, etc.
For example, I want this link here to open up a daily note template, the way that clicking on the day on the calendar plugin would.

Things I have tried

I’ve tried using the “buttons” plugin, but that works with a code block that breaks the bullet formatting that’s needed for the CSS. Just to make it clear, I have the daily note turned off in the core plugins, so the periodic note can function normally. I need a solution that will work with my other periodic notes, not just the daily ones. I also use the beta version of periodic notes that allows multiple instances, so multiple types of daily, weekly, monthly notes.

Would an internal link work? I tried looking into ways to make that work with this setup, but so far no luck.

A great alternative is a way to get buttons to work in a dashboard format, so I don’t have to do any weird fiddling, but so far I haven’t found a way to do that.

I’m using this in my dashboard for opening today’s daily note:

="[[" + dateformat(date(today), "yyyy-MM-dd") + "|today]]"


And this:

`="[[" + dateformat(date(yesterday), "yyyy-MM-dd") + "|yesterday]]"`

Any idea how to make this appear in my daily notes folder? Or really, how to many any command like this open in a specific folder?

Wait, I think I figured it out. In case anyone’s viewing this who’s curious how to do this, I used this:
="[[000 My Notes/Journals/Daily/" + dateformat(date(today), "yyyy-MM-dd") + "|Daily Journal]]"
I have zero idea what this is or how it works, but the point is that it does. I don’t have a good understanding of what language this is in, since the only thing I’m familiar with is very basic JavaScript for the templater plugin. Is this markdown? Any elaborations would be a big help; especially if it explains why the " are where they are. The "[[ and Daily/" seem placed weirdly (because I probably just don’t have the know-how), but without the " both in those exact places, it breaks and gives an error message.

What you’ve written there is inline DQL, see DQL, JS and Inlines - Dataview. And it’s a way to show the result of a single expression, as if it was written in a DQL query.

So what you’ve written is a concatenation of various strings and a call to dateformat() to get todays date. So the "'s are needed to surround the two strings (one before and one after the dateformat), and to define the parameter to the call of dateformat().

Does that make sense?

1 Like

Yes, that makes sense. I’ll be adding that to my pile of things to learn in the future. Thanks to everyone in the thread for helping me out!

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