Template:Edit

From 118Wiki
Revision as of 20:39, 25 September 2024 by Jovenan (talk | contribs) (missing " ; documentation; no longer WIP (although I probably add more properties later))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Template Documentation
Creates an edit link.

Usage

Basic usage:

{{edit}}

Full usage:

{{edit | | text = | talk = | section = | preloadtitle = | tooltip = | class = | style = }}

The unnamed parameter can be used to set the target page. If not used, the current page is the target page. If the target page does not exist, creates it.

text parameter can be used to change the text of the edit link. If not used, defaults to "edit" (in lower case).

If talk parameter is set to "yes", target page is the talk page instead (of the current page, if the unnamed parameter is not used, otherwise of the page indicated by the unnamed parameter).

section parameter can be used to target a section on the page instead. "0" edits the introduction section, "1" the first section etc. Note that some headers don't create a section, so this property may not function as intended. Some pages also disable section edits. If set to "new", creates a new section at the bottom of the page.

preloadtitle parameter can be used to set a default name for the new section created with the section=new selection. Doesn't do anything if new section is not being created. The section name can still be changed manually by the user.

tooltip parameter can be used to change the "tooltip" or the text shown when hovering over the link. If not used, defaults to "Edit [target page name]". Likely not visible to most mobile users.

class can be used to input new classes.

style can be used to input CSS style.

Examples

Simple edit link

{{edit}}

edit

Edit another page, with different text

{{edit|118Wiki:Sand Box|text=Try editing in the sandbox!}}

Try editing in the sandbox!

Add new section to talk page, with preloaded title

{{edit|talk=yes|section=new|preloadtitle=Testing the example|text=Ask a question}}
Ask a question