Hi,

I made a Button to toggle two Stylesheets by adding/removing the tag "
$:/tags/Stylesheet".
It is located on the RightMenu (not on my test-wiki) and contains:
<$details summary="D/m">
D:<$fieldmangler tiddler="Seiten und Tiddler Style Desktop">
<$button message="tm-add-tag" 
param="$:/tags/Stylesheet">D</$button></$fieldmangler>
+<$fieldmangler tiddler="Seiten und Tiddler Style mobil">
<$button message="tm-remove-tag" param="$:/tags/Stylesheet">D</$button>
</$fieldmangler>
<br/><br/><br/>

m:
<$fieldmangler tiddler="Seiten und Tiddler Style mobil">
<$button message="tm-add-tag" 
param="$:/tags/Stylesheet">m</$button></$fieldmangler>
+<$fieldmangler tiddler="Seiten und Tiddler Style Desktop">
<$button message="tm-remove-tag" param="$:/tags/Stylesheet">m</$button>
</$fieldmangler>
</$details>

When I click on it, it expands and shows 4 Buttons: 2 for Desktop (adding 
"$:/tags/Stylesheet" 
to the Stylesheet "Desktop" and removing that tag from the Stylesheet 
"mobil") and 2 for mobile (doing the same the other way round).

That works, but I would like to have only *one Button*. First Clicking on 
this Button would add "$:/tags/Stylesheet" to the Stylesheet "Desktop" and 
removing that tag from the Stylesheet "mobil". And the second click would 
do the same the other way round.

Maybe it could be possible with the Cycle tags?:
D<$tiddler tiddler="Seiten und Tiddler Style Desktop">
<<cycletags "foo bar">>
m<$tiddler tiddler="Seiten und Tiddler Style mobil">
<<cycletags "bar foo">>
</$tiddler>


or maybe with $:/plugins/matabele/mangletags?- but I couldn't bring it to 
work, not at all.


You can test and play with it at http://suryas-testwiki.tiddlyspot.com/

Thanks for your help!
Surya

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/b33dc770-fbd9-491b-916b-d6dd12357bd7%40googlegroups.com.

Reply via email to