List of tagged pages on a tag list changes every time I click on this tag

Hello! I might not be well versed in the nomenclature of Logseq, so please bear with me and the visual description :slight_smile:

So I have separate pages for each book I’m reading, that contain notes. Each page is categorized using #book tag, and the #book tag page is set as Favorite. So when I click on the #book tag I get the list of all pages with the tag.

However, each time I click on the #book tag, the page displays the entries in a different - unknown to me - order. The titles skip around, and it’s hard to, for example, correct something going entry by entry (because when I go back, the book I already corrected is in another location on the list).

Is there a way to display this in an order - whatever it may be? Or just stop the changes in order?

You can use a simple query to sort the pages alphabetically

Hi! Can you maybe provide such query, for those of us who are not knowledgeable in the topic?

I searched for the past 30 min and was not able to find anything that would help me. However, what I did find, was, for example, this Github thread, but I would expect it to have an answer if it was “fixed” or had some help… Here: https://github.com/logseq/logseq/issues/10854.

I would love some help, or at least pointing in the right direction, thank you!

  • Paste {{query (property :tags "book")}} to a new block, presumably in your page with the name book.
    • Use {{query [[book]]}} instead if you use in-line page reference, rather than page property tags.
  • Press Esc. You can now see query results, as well as two icons at the top right corner of the block.
  • Click the table icon once; now the results are displayed as a table.
  • Click the gear icon. Leave only the option “page” selected, and unselect everything else.
  • Click “page” to sort.

Now you have an alphabetical list of all your books.

See Logseq documentation for more info on queries, though it’s written in a way that could generate more confusion than clarity.

OMG, thank you! I did just that and it works!!! What a wonderful help, thank you! Because, yes, I have read the docs page of Logseq but if someone doesn’t have a slightest idea - it does make you confused.

So, again, thank you so much for your help!

Welcome @rudygosia!

The documentation at https://docs.logseq.com are the technical docs and are indeed not always very clear. That’s why I wrote a bunch of lessons about Logseq’s query system. You can find them on this forum:

https://discuss.logseq.com/tags/c/questions-and-help/queries/20/lesson

I’ve marked meowkman’s comment as the solution. I hope you don’t mind, but that’s so people helping out know what questions are unanswered. If you have more questions in the future, please make sure the mark the working answer as the solution. Thank you :pray:

Of course, let’s spread the news! And thanks for the link - I will check in out!

1 Like

Dear @meowkman , I hope you can help me again. Turns out things are not working :slight_smile: I used the query and the steps you mentioned, but I noticed the query only shows 9 entries, whereas I have 25 linked references. Please see attached screenshot.

I also noticed that in my Metadata template, some tags have the hashtag, and some don’t (also on screenshot), can this influence the results?

Do you maybe know why there is a difference between hastags? I tried replacing them, but they revert to original :frowning:

*As you can see, the book “The Pants of Perspective” doesn’t even show up in the table. And yes, the tag has a # showing… Is this related, you think?

You have not been assigning the tags in a consistent way: apparently both tag:: book and type:: #book have been used. That is by no means a fatal issue, but it could complicate the process of getting what you want. The query {{query [[book]]}}, for example, accepts any page that references book in some way, therefore it’s possible to see some noise in the query results.

Consider doing some needed maintenance on your graph.

Thanks! I went over the tags so many times but didn’t check the property… I think your advice of a cleanup is a good one, thank you!

Hi @meowkman I did the maintenance, and now I see the same number of entries in the query and in the Linked References! Thank you very much for your help and open-mindedness.

If you have a moment, I’d like to ask a side-question (since you are really nice in replying, I hope you can help me here as well). I noticed that when I add pdf files, new tags are created: “file:” and “file-path:”. I can delete the tags and still access the files, but I know why they are created. Is that normal? Should I leave them be?

See screenshots: