On Saturday, June 12, 2021 at 12:54:54 PM UTC-7 atulg...@gmail.com wrote: > I am trying to add a shortcut... I don't know what the first line of the > code should be... Please help. >
Try this: <$list filter="[[$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/edit]get[text]!match[show]]" emptyMessage=""" <$action-setfield $tiddler="$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/edit" text="hide"/>"""> <$action-setfield $tiddler="$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/edit" text="show"/> </$list> Notes: * if the config tiddler does not exist or has content matching "show", then the "hide" action is performed * otherwise the "show" action is performed Also, you can make the code more compact, by defining the config tiddler title using a macro and using a filtered transclusion instead of a $list widget to set the content to show or hide, like this: \define config() $:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/edit <$action-setfield $tiddler=<<config>> text={{{ [<config>get[text]!match[show]then[show]else[hide]] }}}/> enjoy, -e -- 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/33169e87-2ec8-4ea0-9829-954f45df6c75n%40googlegroups.com.