SwitchTheme feature request..

4 views
Skip to first unread message

Måns

unread,
Sep 25, 2009, 7:12:17 PM9/25/09
to TiddlyWiki
Hi TwWizards and Eric ;-)

I would like to be able to open a TW with a "permalinkinvoked"
theme.....
When I use one TW in an iframe in another TW it would be great to be
able to set the theme to TotallyTiddlers...
I'd expect a syntax similar to this: url/#theme:TotallyTiddlers...
Is it possible already - somehow?

YS Måns Mårtensson

Eric Shulman

unread,
Sep 25, 2009, 7:57:12 PM9/25/09
to TiddlyWiki
> I'd expect a syntax similar to this: url/#theme:TotallyTiddlers...
> Is it possible already - somehow?

There *is* a #theme:... paramifier. However, it doesn't always seem
to work, and I'm not sure why.

What does work, consistently, is to use an 'option paramifier' to
direct set the preferred theme, like this:

...url/#txtTheme:TotallyTiddlers

Note: an 'option paramifier' is simply the name of some TW option,
(e.g., txtTheme, chkAnimate, txtUserName, etc.) followed by a colon
(:) and then the value to assign to that option. An option paramifier
*temporarily* supersedes whatever option value, fi any, that is
currently stored in the browser cookies.

enjoy,
-e


Måns

unread,
Sep 26, 2009, 6:13:39 AM9/26/09
to TiddlyWiki
Thanks Eric - It works fine!

Btw could you use url#txtTopicsTemplate:closed - to "force" the
treeviewPlugins branches in the tiddlers tagged Topics to open as
closed?? - Ha - that sounded very bad indeed .... I'll try again:

I've helped Dave G. to make a treeviewTemplate, which uses a variable:
"$1" - so it can be uses like this:
<<tiddler TopicsTemplate1 with: ...
Unfortunately it is not possible to make the id a variable as well -
like this:
<<treeview2 "$1" "treeview-gray" 'collapsed: true,
antisesame: "closed", animated: "fast", persist: "cookie",
cookieId:"$1"'>>
I have to set one unique identifier for all Topics like this:
<<treeview ......, cookieId:"Topics"'>>

Either I have to remove the "persist: "cookie", cookieId:"Topics"'"
and see if it still responds to the tag "closed" - and will "remember"
te preferred state from tags - (This is how it works in Google Chrome)
or I will have to find some other way to override the temporary
cookies for this cookieId ("Topics").
Could it simply be set in zzConfigoptions?
Like this:
config.options.txtTopicsTemplate:closed = true;
Or do I have to make the option preamplifier in the tiddler containing
the macro first?

What I need is an option to "force" the tag: "closed" in spite of the
locally stored cookie -
It does seem to rely on/need a plugin called cookie Plugin - ....

You can see the above in NoteStorm here:
http://tinyurl.com/ycaqe5s
(I've tried to permalink to all the tiddlers mentioned)
Any suggestion is appreciated....

YS Måns Mårtensson

Mike

unread,
Sep 28, 2009, 11:00:12 PM9/28/09
to TiddlyWiki
In a unrelated but related way. . .

file:///E:/Private/Documents/TidlyWiki/TestWiki.htm#chkRandomTheme:true

Seems to also fix a problem I was having with SwitchTheme + Local
files :D

Always feels good to gleam a little extra knowledge!

Thanks,
Mike
> > (e.g.,txtTheme, chkAnimate, txtUserName, etc.) followed by a colon
Reply all
Reply to author
Forward
0 new messages