I think different layouts are different views of the same knowledgebase. So I believe there will be layouts like excalidraw layout and timeline layout in the future, just like the Heptabase app.
Here comes the question, how to switch layout using a page control button? Especially on the mobile phone?
The layout mechanism is relatively new, not used by the core itself thus far and there are few if any third party layouts available. As such, there hasnât been a need for a core UI affordance for switching layouts apart from the keyboard shortcut, nor are usage patterns particularly clear yet.
I think that any well thought out PR for such a UI for the core would be well received. The challenge is of course to handle multiple layouts - that is more than two - in a user friendly manner on desktop and mobile devices.
Keep in mind since each layout presents the User Interface differently, the button most likely is available in a different location in each layout. If you look at @BurningTreeC recent multi-column layout as an example.
This is where knowing and memorising the short cut keys ctrl-shift-L is helpful and important if you use one or more layouts.
Not with standing this I think we should encourage all layout designers to include the way to change âaway fromâ the layout visually/button and ideally in a somewhat consistent way for all layouts (as much as possible). In this case the core support will promote consistency.
Searching for âlayoutâ in shadows we find a lot of tiddlers;
I found an action send message tm-show-switcher in $:/core/ui/KeyboardShortcuts/switcher which containes <$action-sendmessage $message="tm-show-switcher" switch="layout"/> which is not documented on TiddlyWiki.com but defined in $:/core/modules/startup/rootwidget.js
I see the layout switcher sets the âpage layout tiddlerâ in $:/layout However I see this javascript does a lot to restart the wiki SO I expect you will always have to use the âtm-show-switcherâ message and select from the available layouts.
This is the dialogue or modal used to select the layout. The selected item is set into $:/layout using the linkcatcher widget.
As I understand it the javascript module is loaded at startup and is âlisteningâ âŚ
Other can perhaps help but are you fine now with a button as above in my last post?
Ah ha
Finally, I see if you place {{$:/snippets/LayoutSwitcher}} in a tiddler you can just click the layout and it changes, you could add $:/tags/SideBarSegment and perhaps with a list-after field with $:/core/ui/SideBarSegments/search and you can select a layout with a click from the sidebar.
Documentation on what precisely though? It isnât apparent to me from that Github discussion as to what precisely there is a need for more information on.
To create an alternative page layout and have the ability to switch to it, you need to create an alternative page template âClone $:/core/ui/PageTemplateâ tiddler with the SystemTag: $:/tags/Layout.