Template:Edit link

From Gentoo Wiki
Jump to: navigation, search
[edit

Documentation

Note
This page is a template. It contains some standardized, often used text, which can be transcluded inside other pages.

As this template is widely used in our wiki, it may be protected in which case only staff members can change it. Use the discussion page to propose enhancements or fixes, or to voice your opinion.

This template is used in template documentation to create an "[edit]" link on non-wikified section headings. An example of its use is seen on the page Template:Ht/doc/See also, which is a bit of reusable documentation listing multiple templates with similar functionality. Instead of repeating the same "See also" section on multiple template pages, it is stored on one page and transcluded into Template:Ht/doc, Template:Htc/doc, and Template:Htm/doc.

If this were attempted using a regular wikified section heading (== See also ==) in Template:Ht/doc/See also, it would not work at all (the wikicode would be displayed instead of a section heading). If it were accomplished using a wikified section heading on each of Template:Ht/doc, Template:Htc/doc and Template:Htm/doc, the resulting (auto-generated) "[edit]" links would lead users to edit those pages instead of Template:Ht/doc/See also. In order to give users the expected behavior, the "See also" section heading is generated (in Template:Ht/doc/See also) using an <h2> HTML element along with a call to this template, {{Edit link}}.

Because of the specialized nature of this template, it should not be used in articles (in the main namespace).

Parameters

None.

Usage

{{Edit link}}

See the template's testcases:


No parameter
Wiki code
{{Edit link}}
Main version
[edit]
Sandbox version
Note
The above documentation is transcluded from Template:Edit link/doc. (edit | history)
Editors can experiment in this template's sandbox (create) and testcases (edit) pages.
Please add categories and interwikis to the /doc subpage. (See the subpages of this template.)