Currently in the config file it’s possible to have queries that run on the journal page by adding queries to :default-queries { :journals [] }.
I’d like if I was able to add a custom query that ran on any page I’m viewing. Basically a way for me to bubble up or collect things on that page. “Show me all todo items in this page that have the tag ‘Important’”, for example.
Maybe add another option to :default-queries called :pages? And any advanced queries that are added to it would be run on any currently open page.
I know you can add queries to a page with /Query. I’m wanting something that is automatically run on any page I am viewing.
I’d use this also. I create a lot of TODOs tagged with people or meetings where i need to discuss the topic. It’s nice for organically developing meeting agendas. The “Linked References” section can get pretty cluttered over time so having the ability to include a custom query would allow me to easily see all unaddressed agenda items for a given person/meeting without having to manually add the query to every page i create.
Edit: I did just discover that you can apply a filter to the linked references to only list TODO items. That’s really nice. I’d still prefer a custom query though so i dont have to modify the filter back and forth all the time. Also, if i wanted to do anything more complex like a date filter i’d be stuck.
I would use this for showing my query “What happened on this day?” for every journal day and not only on the current day. Since today (version 0.8.16) the :current-page input is available, this would be possible, I guess.
I was actually thinking about this and I think this feature would have a ton of potential for great uses.
For example, imagine I want to add a button to all my pages that says “Open in VS Code” and when pressing the button, it opens the Logseq page in VS Code. I could simply have the following query appear on all pages:
It’s probably not exactly the same for your future needs, but if you just want to open the file in your default editor, you can use the menu point for each page (the three dots).
thank you very much, this is sufficient for me at the moment,
it would be nice to have it automatically on each page like within the diary pages, but it works
I would like to know if we still cannot change default queries within all pages and if it’s not planned for the future?
Found this post and it seems like it’s not a feature:
And I blindly tried out on my config.edn and obviously doesn’t work when putting default-queries under :pages, only :journals…
The mentioned “contextual sidebar” is a kind of alternative?, but not a solution: it does not only not update automatically, but it doesn’t look/exist in the same way as a default query in the page structure/html + it also opens in any page including journals which has its own default-queries.
Adding a custom query for each page, specially when you also cannot have an built-in dynamic query, makes it difficult to manage and it’s inefficient.