mirror of
https://github.com/TiddlyWiki/TiddlyWiki5.git
synced 2026-04-30 23:56:54 +00:00
Reorganise docs updates for 5.1.5 additions
We’ll keep the docs for the new features in the prerelease edition until the release of 5.1.5. This means that we can continue to build the tw5.com edition without including the 5.1.5-specific content.
This commit is contained in:
@@ -1,46 +0,0 @@
|
||||
caption: action-setfield
|
||||
created: 20141025120850184
|
||||
modified: 20141025120850184
|
||||
tags: Widgets ActionWidgets
|
||||
title: ActionSetFieldWidget
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
! Introduction
|
||||
|
||||
The ''action-setfield'' widget is an [[action widget|ActionWidgets]] that assigns values to the fields of a tiddler. ActionWidgets are used within triggering widgets such as the ButtonWidget.
|
||||
|
||||
! Content and Attributes
|
||||
|
||||
The ''action-setfield'' widget is invisible. Any content within it is ignored.
|
||||
|
||||
|!Attribute |!Description |
|
||||
|$tiddler |The title of the tiddler whose fields are to be modified (if not provided defaults to the [[WidgetVariable: currentTiddler]] |
|
||||
|//{any attributes not starting with $}// |Each attribute name specifies a field to be modified with the attribute value providing the value to assign to the field |
|
||||
|
||||
! Examples
|
||||
|
||||
Here is an example of a pair of buttons that open the control panel directly to specified tabs. They work by using ''action-setfield'' to set the state tiddler for the control panel tabs.
|
||||
|
||||
<$macrocall $name='wikitext-example-without-html'
|
||||
src='<$button>
|
||||
<$action-setfield $tiddler="$:/state/tab-1749438307" text="$:/core/ui/ControlPanel/Appearance"/>
|
||||
<$action-navigate $to="$:/ControlPanel"/>
|
||||
Go to Control Panel "Appearance" tab
|
||||
</$button>
|
||||
|
||||
<$button>
|
||||
<$action-setfield $tiddler="$:/state/tab-1749438307" text="$:/core/ui/ControlPanel/Settings"/>
|
||||
<$action-navigate $to="$:/ControlPanel"/>
|
||||
Go to Control Panel "Settings" tab
|
||||
</$button>'/>
|
||||
|
||||
Here is an example of a button that assigns tags and fields to the tiddler HelloThere, and then navigates to it and opens the tiddler info panel on the "Fields" tab:
|
||||
|
||||
<$macrocall $name='wikitext-example-without-html'
|
||||
src='<$button>
|
||||
<$action-setfield $tiddler="HelloThere" tags="NewTag [[Another New Tag]]" color="red"/>
|
||||
<$action-setfield $tiddler="$:/state/popup/tiddler-info--1779055697" text="(568,1443,33,39)"/>
|
||||
<$action-setfield $tiddler="$:/state/tab--1890574033" text="$:/core/ui/TiddlerInfo/Fields"/>
|
||||
<$action-navigate $to="HelloThere"/>
|
||||
Modify ~HelloThere
|
||||
</$button>'/>
|
||||
Reference in New Issue
Block a user