I have the following code to get scheduled or non-scheduled tasks for the daily page i’m at:
#+BEGIN_QUERY
{ :query [:find (pull ?b [*])
:in $ ?current-page
:where
[?p :block/name ?current-page]
(or
[?b :block/refs ?p]
[?b :block/scheduled ?p] ;; ahahaha
)
(task ?b #{"TODO"})
]
:inputs [:current-page]
:group-by-page? false
:breadcrumb-show? false
}
#+END_QUERY
It works well if i use the specific page, but if i go to the journal page where all the pages are listed, i lose the data. Is there a way to make current-page applied only when the template is applied?
I tried using the <% current-page %> in the code but that is replaced with current-page.
Do i have to use a page property to set the current-page static and then replace the current-page on the code with page property?