Template:Assign edit button/doc
Contents
Syntax
- Variable 1: The name of the article to edit. The default value is the full name of the page that references this template. If the page referencing this template is not in the (Main:) namespace, then the default value of Variable 1 will contain the namespace of the page.
- To give an example: If this template is referenced by Help:Wiki quickstart in a form without any variables (that is, writing {{Assign edit button}} straightly), then the page edited by clicking this button will be Help:Wiki quickstart, instead of Wiki quickstart.
- Variable 2: Replaceable text. The default value is "Click me to edit Variable 1".
- Continuing with the above example, in this case (all default values are used) the effect of the resulting template looks like this: Click me to edit Template:Assign edit button/doc.
Usage
{{Assign edit button|1=(Variable 1)|2=(Variable 2)}}
Or:
{{Assign edit button|(Variable 1)|(Variable 2)}}
Or:
{{Assign edit button|(Variable 1)}}
(Omitting Variable 2)
Examples
{{Assign edit button|1=Template:Moe points/Others|2=Edit Template:Moe points/Others}}
Result: Edit Template:Moe points/Others
{{Assign edit button|1=Template:Moe points/Others}}
Result: Click me to edit Template:Moe points/Others
See also
- {{ColoredEdit}}: Provides more perfect link color definition functions.