Difference between revisions of "Template:Custom edit"

From "PTTLink Wiki"
Jump to navigation Jump to search
(Created page with "<span class="noprint plainlinks">[{{FULLURL:{{#if: {{{1|}}} | {{{1|}}} | {{FULLPAGENAME}} }}|action=edit{{#if: {{{oldid|}}} | &oldid={{URLENCODE:{{{oldid|}}}|QUERY}}...")
m (1 revision imported)
 
(No difference)

Latest revision as of 08:03, 24 January 2022

edit

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

Provides a custom link for editing a page.

Usage

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

Example (with the two main parameters):

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

Note you can use an internationalised text template like {{Support}}:

{{Custom edit|Commons:Sandbox|{{Support}}}} gives   15px Support.

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 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.

Discussion
There is an ongoing discussion about that matter. Feel invited to comment if you are experienced in either way, your time permits and if you like to share your opinion or to make a suggestion.


Wikipedia's help about TemplateDataCommons-specific information

Provides a custom link for editing a page.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
page1

Full pagename of the page to be edited.

Default
{{FULLPAGENAME}}
Pageoptional
edit introeditintro

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

Pageoptional
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 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.

Pageoptional
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
Pageoptional

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

⧼Seealso⧽

Localization

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