Graphical explanation of pages, blocks and references

Imagine the pages as nodes organized on a circle:
image


The [[references]] are links (arrows with a direction). This is a graph/network and it can be displayed in Graph View:

image


Each page has a tree of blocks:

image


The [[references]] are links that actually start from a block and target a page.

image

Imagine that the circle represents a room, the “hall of pages”. The pages are doors and the links can be represented as people entering the room from one door and exiting from another. The Graph View available in Logseq displays the paths they took in the hall of pages, with no information of blocks that are behind each door.

In a geometric sense, the connections you see in Graph View are the projections of the actual links that go from blocks to pages. If you are not familiar with a projection, think of it as a shadow:

The page references can be traversed in the opposite direction thanks to the section Linked references available at the bottom of each page.


Instead a connection between pages can be made using Page properties. A special property is Tags, because the same link can be traversed in the reverse direction thanks to a section that appears at the bottom of pages, named “Pages tagged with (current page)”.


In general, properties have a key:: and a value, so basically those links are triples like subject + verb + object. Compared to the previous links (those made with [[references]] from a block to a page), these links made with properties are relations with a name.

image

Even if you, as a user, can’t see it, everything in Logseq is stored as triples in a so called graph database. Then Logseq UI displays only a small portion of that graph i.e. the one where nodes are pages and the links are the [[references]].


Since blocks can have properties too, it is possible to turn a normal [[reference]] in one where the name of the relation is specified. For example, a block could represent a book, a page an author and the property author:: their relation:


It is also possible to use block references as values of properties. Since pages are not involved, no connection is displayed in Graph view. In the example below, the pages Books and Authors gather all books and authors (maybe organized in a hierarchy of blocks) and the property author:: links them:

The image above also represent the same link traversed in the opposite direction thanks to the button that appears at the right of a block when it has been referenced somewhere else. In the example above it let you see all the books by an author and where that author is mentioned in general. This feature is available in latest Logseq release (0.8.18) thanks to this change by @cldwalker (many thanks!).

It’s up to the user to choose what should be a page and what a block. Using queries it is possible to retrieve content using both page references and block references. It is also possible to specify the name of the relation in case properties were used and even retrieve everything that has a given property key like author::.


Here there is the source file of these drawings, you can download and open it with https://beta.tldraw.com (Menu > File > Open file):

25 Likes

If I follow the instructions then after opening the file nothing happens.

Thank you for posting that, it’s a really nice explanation.

1 Like

Very good explanation, thank you!

1 Like

If you mean the Tldraw file, maybe the file open but it is zoomed too much on a white area? In that case you need to zoom out. For the rest it works as expected for me :slight_smile:

Is this still the case? Or has this UI element been deprecated? I am not seeing such a segment when I click on a tag:: value in Logseq version 0.9.19.

Have you tried tags:: instead of tag::?

Yeah, I am using tags:: in my book notes.
Here are some screenshots illustrating my point:

Here’s how I do my book notes. Notice the tags:: property down there. It is a “page property” as far as I understand the concept.

Here’s what I see when I click on the econ tag. There are no “Pages tagged with” segment, down below the page.

No, you are using block properties. Page properties must be placed in the first top-level block.

The ## Meta header is the first top-level block. Am I missing something?

That # Meta turned it into a regular block. You have to place only properties in the first top-level block.

1 Like

I didn’t know that! I should fix this with my notes, going back to my 10-or-so pages that I already have this error…

Wait… Even though you say I have turned it into a regular block, I can see those property values under “Page Property” filter in a query builder:

How about that? It seems like even though I have the ## Meta in the first block of a page, and under it I have listed some properties, they are still listed as “Page Properties” when I select /Query → Page → property , and then visiually inspect the available options.

Yeah, this is weird in logseq’s behavior. There is a lot to it in unexplained, undocumented behavior that the user is not being hand-held through a showcase or something. Now I am getting nuanced behavior of some types of page properties, and block properties, when they are formatted differently.

You have properties, when they are alone in the first top-level block they refer to the page, otherwise to the block. Once you have defined a property key it doesn’t matter if it was mentioned as page or block property.

The documentation says:

Page properties are defined by putting them into the first block of the page (frontmatter).

image