This page is semi-protected against editing.

Template:Custom edit

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

edit

Template documentationview · edit · history · purge ]
This documentation is transcluded from Template:Custom edit/doc.

This ticket provides a custom link for editing a page

Usage

{{Custom edit |1= |text= }}

Template parameters

ParameterDescriptionDefaultStatus
1pageFull pagename of the page to be edited.{{FULLPAGENAME}}optional
text
2
textText to display in the edit link.editoptional
oldidold idUnique identifier number of the page version in its history. Note that this also overrides its current pagename, if that page was moved or if this refers to a version of another page on the same wiki. If that parameter is used, the user will see an additional a warning at top of the edit form, because publishing changes made by the user in this edit session this will revert existing changes already published in the target page after that historic version.emptyoptional
sectionsectionSection name on target page to edit.emptyoptional
editintroedit introFull name of a page to render as an introduction or guide just above the edit form.emptyoptional
preloadtitlepreload titleSection heading title to preload in the edit form when creating a new section in the target page.emptyoptional
preloadpreload pageFull name of a page (usually a dedicated template) to transclude into the content edit form when creating a new page or section.emptyoptional
<templatedata>JSON</templatedata> ./. {{TemplateBox}}
TemplateData

TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used by VisualEditor and possibly other tools like Upload Wizard.


Existing template documentation
At Wikimedia Commons, it is recommended to use {{TemplateBox}} with either ‎useTemplateData=1 or ‎useTemplateData=only on the ‎/doc subpage and transcluding it with {{Documentation}} into the template. ‎<nowiki>-tags can be wrapped around the arguments, if required, to avoid templates being expanded.

Newly created template documentation and imports
Another option, especially for imported templates, or for users with JSON experience, is placing raw ‎<templatedata>-tags into the Wikitext of the template, as described in various Wikipediae.


Wikipedia's help about TemplateDataCommons-specific information

This ticket provides a custom link for editing a page

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
page1

Full pagename of the page to be edited.

Default
{{FULLPAGENAME}}
Page nameoptional
edit introeditintro

Full name of a page to render as an introduction or guide just above the edit form.

Page nameoptional
old idoldid

Unique identifier number of the page version in its history. Note that this also overrides its current pagename, if that page was moved or if this refers to a version of another page on the same wiki. If that parameter is used, the user will see an additional a warning at top of the edit form, because publishing changes made by the user in this edit session this will revert existing changes already published in the target page after that historic version.

Numberoptional
preload pagepreload

Full name of a page (usually a dedicated template) to transclude into the content edit form when creating a new page or section.

Page nameoptional
preload titlepreloadtitle

Section heading title to preload in the edit form when creating a new section in the target page.

Lineoptional
sectionsection

Section name on target page to edit.

Lineoptional
texttext 2

Text to display in the edit link.

Default
edit
Page nameoptional

Additional information

The template is intended to be used in the following namespaces: all namespaces

The template is intended to be used by the following user groups: all users

Examples

{{Custom edit|Commons:Sandbox|'''Play in the sandbox'''}}

renders as:


{{Custom edit|Commons:Sandbox|{{Support}}}}

renders as:

See also

Localization

This template is localized by utilizing MediaWiki namespace messages. These can be translated at translatewiki.net (current translations).