Difference between revisions of "Template:Edit/doc"
imported>SD0001 (rm cat: not a cleanup template) |
imported>Wugapodes (add tooltip documentation) |
||
| Line 5: | Line 5: | ||
==Usage== | ==Usage== | ||
| − | <code><nowiki>{{</nowiki>'''Edit'''|''Page''|''Label''|section=''Section''|editintro=''Editintro''|preload=''preload''|preloadtitle=''Preloadtitle''<nowiki>}}</nowiki></code> | + | <code><nowiki>{{</nowiki>'''Edit'''|''Page''|''Label''|section=''Section''|editintro=''Editintro''|preload=''preload''|preloadtitle=''Preloadtitle''|tooltip=''tooltip''<nowiki>}}</nowiki></code> |
All parameters are optional | All parameters are optional | ||
| Line 14: | Line 14: | ||
*Preload: Title of a page to preload into the edit form if the page to be edited does not exist | *Preload: Title of a page to preload into the edit form if the page to be edited does not exist | ||
*Preloadtitle: if section=new, a title to be preloaded into the title box of the edit form | *Preloadtitle: if section=new, a title to be preloaded into the title box of the edit form | ||
| + | *Tooltip: the text to display when user hovers over the link | ||
{{TemplateDataHeader}} | {{TemplateDataHeader}} | ||
| Line 53: | Line 54: | ||
"label": "Preload title", | "label": "Preload title", | ||
"description": "If making a new section, preload the title box with this" | "description": "If making a new section, preload the title box with this" | ||
| − | } | + | }, |
| + | "tooltip": { | ||
| + | "label": "Tooltip", | ||
| + | "description": "Text to display on mouseover", | ||
| + | "default": "Page or section name", | ||
| + | "type": "string" | ||
| + | } | ||
}, | }, | ||
"description": "Displays a link to edit a page.", | "description": "Displays a link to edit a page.", | ||
| Line 62: | Line 69: | ||
"editintro", | "editintro", | ||
"preload", | "preload", | ||
| − | "preloadtitle" | + | "preloadtitle", |
| + | "tooltip" | ||
] | ] | ||
} | } | ||
Revision as of 21:36, 18 October 2019
| 40px | This is a documentation subpage for Template:Edit. It contains usage information, categories and other content that is not part of the original template page. |
Provides a link to edit a page. This template is a self-reference and so is part of the Wikipedia project rather than the encyclopedic content.
Usage
{{Edit|Page|Label|section=Section|editintro=Editintro|preload=preload|preloadtitle=Preloadtitle|tooltip=tooltip}}
All parameters are optional
- Page: the page to edit, if not the current page
- Label: the text to label the link, defaults to "edit"
- Section: the section to edit, 0 for top section, "new" to add a new section
- Editintro: Title of a page that will be transcluded above the edit box. Not a wikilink, templates require
Template: - Preload: Title of a page to preload into the edit form if the page to be edited does not exist
- Preloadtitle: if section=new, a title to be preloaded into the title box of the edit form
- Tooltip: the text to display when user hovers over the link
TemplateData for Edit
Displays a link to edit a page.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Page | 1 | The page to edit
| Page | suggested |
| Label | 2 | The link label
| String | optional |
| Section | section | The section to edit; 0 for the top section; new for a new section
| String | optional |
| Edit Intro | editintro | Title of a page that will be rendered above the edit box, no wikilinks, with namespace if not main
| Unknown | optional |
| Preload | preload | Title of a page to preload in the edit form when creating a new page or section | Unknown | optional |
| Preload title | preloadtitle | If making a new section, preload the title box with this | Unknown | optional |
| Tooltip | tooltip | Text to display on mouseover
| String | optional |
See also
- {{Ed}} —– plain-style edit link surrounded by <small> tags, specifically for templates only
- {{Ed right}} —– plain-style edit link surrounded by <small> tags and aligned to right of page, specifically for templates only
- {{Edit}} —– plain-style edit link, applicable to all Wikipedia namespaces
- {{Edit section}} —– edit link surrounded by <div> tags by default which can specify which section to edit on a page, applicable to all Wikipedia namespaces
- {{Edit sup}} —– plain-style edit link surrounded by <sup> tags, applicable to all Wikipedia namespaces
- {{Edit sub}} —– plain-style edit link surrounded by <sub> tags, applicable to all Wikipedia namespaces
- {{Vedit}} —– plain-style edit link which edit with the Wikipedia:VisualEditor, applicable to all Wikipedia namespaces
Templates with view, talk and edit links:
- {{Navbar}} —– navigation bar with configurable caption and view·talk·edit links, specifically for templates only
- {{View}} —– navbar-style view·talk·edit links, specifically for templates only
- {{VTE}} & {{V}} —– navbar-style V·T·E links (i.e. view·talk·edit links in short forms), specifically for templates only