Advanced query view formatting for task list

I am trying to figure out how to create a list of tasks but to have a different formatting (rather than group by page, which is great for some things).

I would like to aim for a format similar to this one (different software) where the page/block breadcrumbs show up beside it and everything is in one line (and without the page grouping):

I started to try with the “:view” which I believe is the correct place to do it but can’t see how to redo the formatting.

#+BEGIN_QUERY
{:title "next 7 days' deadline or schedule"
:query [:find (pull ?block [*])
        :in $ ?start
        :where
        (or
          [?block :block/scheduled ?d]
          [?block :block/deadline ?d])
        [(< ?d ?start)]]
:inputs [:today ]
:view (fn [result]
     [:div
      (for [tt flatten result]
        [:a {:href (str "#/page/" tt/page-ref )} 
         'this']
)])
:collapsed? false}
#+END_QUERY

The “this” above was me playing around trying to see how to do the formatting. But I couldn’t figure it out.

1 Like

Hi. Did you get any further with this? I’m looking for a similar solution.

Thanks.

Trying to do the same but just to display the block reference. This query gets my the block UUID but it displays it as plaintext instead of rendering. Anyone know if there is a way to render it properly?

#+BEGIN_QUERY
{
  :title "DOING Tasks"
  :query [:find ?uuid
          :where
          [?b :block/marker "DOING"]
          [?b :block/uuid ?uuid]]
  :view (fn [result]
          (map (fn [uuid]
                 (str "((" uuid "))"))
               result))
}
#+END_QUERY