More flexibility in page layout (e.g. linked references on top)

This is perhaps my biggest painpoint with Logseq as of now.

I’ll start by explaining what I mean by “flexibility in page layout”. So a logseq page can have these components (as shown in the following screenshot):

  • Title
  • Page properties (e.g. alias)
  • Page content
  • Linked references
  • Hierarchy
  • Unlinked references

These components follow a fixed order in the layout:

Top
Title
Page properties
Linked references
Hierarchy
Unlinked references
Bottom

Some components may not be present, but the rest still follow this order.

Sometimes, I really hope I can:

  • Put Linked references on top of the page.
    Because I left some TODOs in daily journals, expicitly tagged with this page’s title.
  • Put Hierarchy on top of the page
    I use hierarchy to organize big topics like “C++”, and hierarchy serves as an “index” for this topic. Just like you would expect the table of content to be in the very first few pages of a book.
  • More, I don’t remember at the moment

Overall, these needs all come down to flexibility in page layout, i.e. to allow users put different components in the order they like.

There will probably be some restrictions, like title and page properties need to be on top, which is fine. But I feel people would have different preferences for how to organize the rest of the components, and there really isn’t a unified answer. If we were to add this feature, users should be allowed to configure the layout on a per page basis.

I remember this topic (specifically, put linked references on top) have been brought up several times on Discord. But I searched Discuss/GitHub, and didn’t find any feature request for it. I would really hope this could be added to Logseq one day, which shall hugely improve usability and empower more ways of using the software.

I can’t agree more. I also have some pages with a similar structure. Currently, I had to manually list all sub-pages at the top of my note.

IMHO it would be great if logseq provides a few macros like #list_hierarchy, providing such flexibility in the layout

1 Like

Use macro {{namespace C++}}

4 Likes

It would also be nice to have references, page properties etc in a second column if there is enough horizontal space (think about Wikipedia right sidebar that appears at top on mobile).

2 Likes

I’d also really like this…

1 Like

How precisely should I use this macro? Insert in some config file? Or on the page? And what should I insert?

Sorry for stupid question (I’m a Logseq newbie). I would really appreciate Your help :slight_smile:
Andy

What macro are you referring to?

I replied to the post by stdword above:
Use macro {{namespace C++}}`
I thought that may be a suggestion to solve the problem described in this thread.

Andy

You can put generated hierarchy to any place on the page by just typing {{namespace C++}} to a block. C++ is just an example - a root page name from first post. You may want to use your name instead.

3 Likes

many thanks, I did it and that works :slight_smile:

Is this documented somewhere? I would like to check if there are other keywords

Me too) If you find a link share it with us please!

What do you think of the following idea?

General settings for all pages

Linked references:   Top/Bottom/None
Unlinked references: Top/Bottom/None
Namespace:           Top/Bottom/None
Page graph:          Top/Bottom/None

Commands for more flexibility when choosing “None” for some of the above settings

For current page:

{{linked-references}}
{{unlinked-references}}
{{namespace list}}
{{namespace breadcrumb}}
{{page-graph}}

For an another [[page]]:

{{linked-references page}}
{{unlinked-references page}}
{{namespace list page}}
{{namespace breadcrumb page}}
{{page-graph page}}
3 Likes

I like the idea of special commands, but I wonder where do you want to put the general settings?

Three dots menu on top-right > Settings > Editor ?

This works, Thank you very much.

1 Like

I agreen being able to customize the layout would be great. E.g., for the main note pane, the order of the sections: page contents, hierarchy (if any), linked references, unlinked references.

Any suggestions on workarounds/hacks to achieve this would be welcome.

this also worked for me. many thanks for sharing the macro!

1 Like

Hey, guys! There is a «Pages tagged with …» section, which is not mentioned here, but is a part of the page layout too.

You can move it to any place at the page with :classical_building: Full House Templates plugin in a similar way that namespace macro works. See details here.

I’m still hoping this will be implemented natively (not just as a plugin).

I think {{linked-references}} for implied “current page”, but allowing an optional page argument, is a very neat solution.

With the proposed settings model there would be some unneccessary ambiguity - e.g. the order of linked/unlinked refs for such settings:

Linked references:   Bottom
Unlinked references: Bottom

I would suggest that the main content view instead is rendered from a template that the user can define. The default template would read e g

{{page-bullets}} // main contents
{{linked-references}}
{{unlinked-references}}
{{namespace list}}

This opens a lot of possibilities, including using a query to change the layout or include/exclude parts dynamically, depending on some page conditions. (Yes, that could be problematic performance-wise - up to the user to use it in a way that doesn’t badly affect performance.)

Preferrably, the left side pane and right pane page rendering could use their own templates.

1 Like