Default theme - TW5

168 views
Skip to first unread message

stevesuny

unread,
Dec 8, 2016, 10:38:20 AM12/8/16
to TiddlyWiki
This is probably a simple question, but no help in group so far: How do I establish a default theme for a wiki that runs on startup, or when loading? Thanks, //steve.

Jeremy Ruston

unread,
Dec 8, 2016, 10:45:24 AM12/8/16
to tiddl...@googlegroups.com
Hi Steve

This is probably a simple question, but no help in group so far: How do I establish a default theme for a wiki that runs on startup, or when loading? Thanks, //steve.

Set the value of the tiddler $:/theme to the title of the theme plugin you wish to use (eg $:/themes/tiddlywiki/centralised). Using the “Theme" button under the “Tools” tab in the sidebar has the same effect.

Best wishes

Jeremy.


--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/f4a21962-b8cd-4b8c-8636-d33f2af14c97%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Steven Schneider

unread,
Dec 8, 2016, 2:47:41 PM12/8/16
to TiddlyWiki
I see that the value of $:/theme is the theme of the moment -- but I want to be sure that the wiki, when opened, always opens with a specified theme (I guess another way of saying this would be that I want to rewrite $:/theme to be a specified value when the wiki is saved).

For example, in my under-construction slide-show macro (https://designwritestudio.github.io/experimental/intermixed-slides/intermixed-slides-demo.html), I employ a strategy that changes $:/theme to Punch, and then opens tiddlers into what is now a slideshow. If I save that wiki (for example, for a local copy) before ending the slideshow, it will open in Punch. I want establish snowWhite (or some other theme) as the default theme that opens when that wiki opens.

Thanks,

//steve.

Steven Schneider

unread,
Dec 9, 2016, 11:07:54 AM12/9/16
to TiddlyWiki
Turns out it is (as always) a bit more complicated: The macros I've written (to start/end slideshows) change the theme:

\define slideshow()
<$button set="$:/state/sidebar" setTo="no" tooltip={{$:/language/Buttons/HideSideBar/Hint}} aria-label={{$:/language/Buttons/HideSideBar/Caption}} >
<$action-sendmessage $message="tm-close-all-tiddlers"/>
<$list filter="[tag[Slides]![sort[list]]">
<$action-navigate $to=<<currentTiddler>> />
</
$list>
View Slide Show
<$action-setfield $tiddler="$:/theme" text="$:/themes/tiddlywiki/punch"/>
</$button>
\end

\define endslideshow()
<$button set="$:/
state/sidebar" setTo="yes">
<$action-setfield $tiddler="
$:/theme" text="$:/themes/tiddlywiki/snowwhite"/>
<$action-sendmessage $message="
tm-close-all-tiddlers"/>
<$action-navigate $to="
HelloThere"/>
Return to the wiki
</$button>
\end



(Does it make sense to use a <$list> construction, or should I be just changing the story? How would I do that?)

In a read-only mode (i.e. served via Dropbox), my readers are asked if they want to leave the site, and that data may not be saved. Of course, this is fine with me, but requires educating my readers.

I'd like to be able to change the theme on the fly, but not trigger the save message, which would also solve my initial goal of creating a default theme that is always the theme when the wiki opens.

Thanks,

/steve.
Reply all
Reply to author
Forward
0 new messages