Default query based on page properties

Hello,

I want to have a default query that list all pages with a specific value in the property “status”. I manage to create the query, it is displayed in my journal and also says “5 results” but there is no list.

This is my query :

{
    :title [:h2 "Projects in progress"]
    :query [:find (pull ?p [*])
      :where
      (page-property ?p :status "in_progress");
      ]
}

On project pages (i.e : “Project A”), I have a property : status:: in_progress.

Result :

Is it a problem of display ? Or should I add something to my query ?

Thank you

Thank you. After many attemps, I manage to get the list with this query :

{:title "Projects in progress V3"
 :query [:find ?page_name
   :where
	 [?b :block/name ?page_name]
	 (page-property ?b :status "in_progress");
 ]
}

The list I get is plain text (not clickable) and in lowercap. Anyway to modify it (by using
:result-transform) ?

  • For the case of the names, replace :block/name with :block/original-name
  • For making it clickable, add the following above the last } :
     :view (fn [names]
       [:ul
         (map (fn [name]
           [:li [:a {:href (str "#/page/" name)} name]]
         ) names)
       ]
     )