How about this: <$button set="$:/themes/tiddlywiki/vanilla/settings/backgroundimage" setTo="FirstImageTiddler"> Image 1 </$button> <$button set="$:/themes/tiddlywiki/vanilla/settings/backgroundimage" setTo="SecondImageTiddler"> Image 2 </$button>
If you want an action widget instead because you want to be able to do multiple actions on the same widget, you could instead use an $action-setfield widget, like: \define setAction(imageName) <$action-setfield $tiddler="$:/themes/tiddlywiki/vanilla/settings/backgroundimage" text="""$imageName$"""/> <$button actions=<<setAction "FirstImageTiddler">>> Image 1 </$button> On Friday, February 19, 2021 at 1:36:49 PM UTC-6 zela...@mail.fresnostate.edu wrote: > I have a button to switch between dark and light mode, but I also have a > background picture and not a default background color. > How do I change the background picture in click of button? > > thank you ! > -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/f928d338-0a99-491a-b9fe-f5acad810e72n%40googlegroups.com.