Switching theme layout &storyview with one click?

Hi folks,
I recently learned about the posibilites to modify the Layout $:/layout.
Because for some ideas theme layout and storyview have to work together: Is it a good idea to put a $:/layout and $:/storyview-tiddler into the theme to switch them at the same time?

1 Like

Depends on the purpose. You wanna load Tiddlers? OR Tiddlers AND layout?

In a way it is as simple as asking: “What are you doing? Why?”

TT

As I said: Switch the $:/layout Tiddler when changing themes:

https://tiddlywiki.com/#Alternative%20page%20layouts:[[Alternative%20page%20layouts]]%20%24%3A%2Fsnippets%2FLayoutSwitcher

I trick I just learned and of which I know nearly no examples out there in the wild. Though it really seems to have big potential.

It would be nice if tiddlywiki.com had an alternative layout to demonstrate the power of this.

1 Like

I switch the layout, theme and storyview together as part of my setup. The default layout is my debugging/backtage area and uses the classic storyview, whereas the custom layout also uses a custom storyview.

I think that would work, it is an interesting idea. Or if you want to use an off the shelf theme and not have to modify it, you can just write an action string that switches all three simultaneously but independently (which is what I currently do).

2 Likes

After doing a test with the Krystal-Theme I found some difficulties in achieving this.

  • First packing a theme into a plugin the theme it is not shown in the theme-switcher because it is a shadow - after changing the filter to tiddlers+shadows the basic idea worked and it unwrapped $/%layout and $/%view

$ _snippets_themeswitcher.json (685 Bytes)

  • Then the unwrapped css did not behave as expected, supposedly because it was missing content of the default themes. For those daring to test on tiddlywiki.com:

$ _plugins_krystal.json (40.4 KB)

1 Like

This is the contrary approach, making Roman Veselý’s aka crazko’s Krystal a switchable layout using reveal on some .css
It gives you a paperstack-like experience to scroll through horizontally. The main advantage of this Mod is that it can be turned off to go back to the normal Layout. My implementation is not perfect yet but it works, You need the Layoutswitcher which is included to turn it on.

Krystal and Switcher.json (39.5 KB)

1 Like

Here is a better version of my mod of the Krystal horizontal layout-plugin which now can be used as a start-layout without causing a js-error.
KrystalPlugin.json (37.1 KB)
and a pagemenu button to turn it on.
LayoutButton.json (1.6 KB)

1 Like

Just as an aside relating to Switching theme layout &storyview with one click? it is possibly to capture a set of tiddlers (and their content) into a bookmarklet with which one click will apply all the tiddlers to the current wiki.

Similarly you can do the same with the different tiddlers to switch to another state. Make sure the same tiddlers are referenced in both so it can be toggled.

I am yet to find a way if the “bookmarklet(s)” or something similar, can be clicked inside the wiki, rather than first being placed in your browser bookmarks.

1 Like

Hi @TW_Tones, that sounds to be a good concept.
Please continue your research on that topic and keep us informed!
Are bookmarklets a default-feature, or are they specific to TiddlyClip?

Bookmarklets are a browser feature. You may search for “browser bookmarklets” in your preferred web search engine.

Right. Often they prove very good cross-browser, which is a big plus.
That said, if you developing one it is wise to check that.

Just a comment, TT

Right.

A practical issue is copying them between browsers.
This is likely more a documentation issue than a big problem?

Just a query, TT

I have happily dragged bookmarklets between browser bookmarks chrome and firefox at least.

I have a tool to create bookmarklettes in tiddlywiki and am yet to capture it in a way that sharing the tiddler is also sharing the bookmarklette, just needs time. This is another way to transfer bookmarklettes via a tiddler.

I would be keen to find a way to execute the javascript payload in wiki if possible.

A lot can be done to build workflows with bookmarklettes that have more access than in the tiddlywiki

  • I wonder if a bookmarklet could be written to trigger a dialogue to select and save (in a wiki or elsewhere) a local folder address.
  • I have built a way that bookmarklets can drop tiddlers on a wiki that trigger processes.