Template:Action
This template, , produces links that perform an action on the target page through the use of URL query parameters. The design goal is to provide equivalent functionality to MoinMoin's <<Action()>> macro. Note that this only replicates functionality that existed on the Debian wiki at the time of migration—other actions may be supported by MoinMoin itself.
Usage
The baseline behavior for the template is to produce a link to edit the page it appears on, using the text: edit page; when invoked with no parameters that will always be the result.
Parameters
This template currently accepts three parameter values, though none of them are strictly required. They are each independent of the others and can be used individually or in any combination to suit the situation. They may be used either by name or as unnamed positional parameters, but beware that the latter style requires that parameters always be defined in tandem with any others that precede them in the positional sequence (i.e., you can only set the second parameter along with the first, and only set the third after the other two). The loophole in that scenario is that the preceding positional parameters do not need to be used, per se, since null (empty) values are accepted as valid.
| Position | Name | Description |
|---|---|---|
| 1st | |action=
|
One of a set of keywords that specify the desired page action to trigger, with edit as the default when not defined. The list of valid keywords can be found in the § TemplateData section below.
|
| 2nd | |page=
|
The name of the page to perform the action on, including the namespace if not in Main. If |action=<login|preferences|recoverpass|userprefs>, this parameter is ignored.
|
| 3rd | |text=
|
The text to be linked to the page action; when undefined sensible defaults are used. |
Link text
The default link text used by each of the action keywords is as follows:
| Action keyword | Default text |
|---|---|
edit
|
edit page |
history, info, log
|
view history |
login, recoverpass
|
reset password |
preferences, userprefs
|
preferences |
subscribe, watch
|
add to watchlist |
TemplateData
Produces linked text that triggers an action on the target page through the use of URL query parameters; specifically designed as a drop-in replacement for MoinMoin-style action behaviors
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Page action | action 1 | The action to trigger on the target page
| Line | required |
| Target page | page 2 | The page to perform the action on, defaults to the transcluding page if omitted.
| Page name | suggested |
| Link text | text 3 | The displayed text that will be linked to the page action; sensible defaults will be used if omitted.
| Line | optional |
Template demo / sandbox
A demonstration page for its feature set is available at ExampleForAction.