Hi! I am a new user trying to figure out how to integrate silverbullet into my daily routine. I found a great resource for doing daily notes but it’s in v1 and I am beating my head against a wall trying to get it working in v2.
Here’s the query:
page where date = @page.date and tags = “meeting-notes” render [[Library/Core/Query/Page]]
My goal is just to get a list of links to pages representing meetings that happened the same day as the calling page.
${template.each(
query[[from index.tag "page" where date == _CTX.currentPage.date and table.includes(tags, "meeting-notes")]],
templates.fullPageItem
)}
Something like this should work. I hope this gives you enough starting points to look into the docs and read up about the functions used etc.
This is pretty similar to what I had, although I didn’t know _CTX was a thing.
I’m getting nil back for _CTX.currentPage.date and for the item’s date though. Looks like I can do created but that seems to give back a string with a timestamp. Maybe I have to write a function to convert it to just the date and compare that.
Now I get mandela effect. Did a property date ever exist? I just thought this was something you defined yourself.
But yes you can use created, but I don’t think there is any real functions to do any thing with the timestamp. You could try a library … or write it yourself
Yeah I just did a string.sub to grab the first 10 characters. Seems to get the job done, though I am having trouble getting that into a template. Seems like it tries to evaluate the lua before the context exists and just fails to create the page, maybe?