Template:Edit/doc: Difference between revisions

m
no edit summary
sims>A morris
m (2 revisions: Template:Edit from Wikia Templates)
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1:
 
;==Description==
:This template createsprovides a clickable edit link forto theedit givena page name.
;Syntax
 
:All parameters are optional. In order the parameters are...
==Usage==
::<code>{{t|edit|pagename|linkname|section}}</code>.
{{tlx|Edit|Page|Label|section{{=}}Section|editintro{{=}}Editintro|preload{{=}}preload|preloadtitle{{=}}Preloadtitle|nobrackets{{=}}yes/no}}
;Sample output
 
:<code><nowiki>{{edit}}</nowiki></code> gives...
By default, simply using this template will provide a link to edit the currently displayed page.
:{{edit}}
 
:<code><nowiki>{{edit|Wikia Templates}}</nowiki></code> gives...
The following parameters are available. All of them are optional.
:{{edit|Wikia Templates}}
*'''Page''': the page to edit, if not the current page
:<code><nowiki>{{edit|Wikia Templates|edit the main page!}}</nowiki></code> gives...
*'''Label''': the text to label the link, defaults to "edit"
:{{edit|Wikia Templates|edit the main page!}}
*'''Section''': the section to edit, 0 for top section, "new" to add a new section
:<code><nowiki>{{edit|Template_guidelines|Edit template code rules|2}}</nowiki></code> gives...
*'''Editintro''': Title of a page that will be transcluded above the edit box. Not a wikilink, templates require <code>Template:</code>
:{{edit|Template_guidelines|edit coding rules|2}}
*'''Preload''': Title of a page to preload into the edit form if the page to be edited does not exist
:<code><nowiki>{{edit|Template_guidelines|3=2}}</nowiki></code> gives...
*'''Preloadtitle''': if section=new, a title to be preloaded into the title box of the edit form
:{{edit|Template_guidelines|3=2}}<includeonly>
*'''nobrackets''': If set to <code>yes</code>, the square brackets around the link will not be displayed.
[[Category:General wiki templates|{{PAGENAME}}]]</includeonly><noinclude>
 
[[Category:Template documentation|{{PAGENAME}}]]</noinclude>
{| class="wikitable"
!Template !! Result
|-
|{{tlx|edit}} || {{edit}}
|-
|{{tlx|edit|The Sims Wiki:Sandbox}} || {{edit|The Sims Wiki:Sandbox}}
|-
|{{tlx|edit|The Sims Wiki:Sandbox|Edit the page of awesome}} || {{edit|The Sims Wiki:Sandbox|Edit the page of awesome}}
|-
|{{tlx|edit|Template:Edit/doc|section{{=}}1}} || {{edit|Template:Edit/doc|section=1}}
|-
|{{tlx|edit|2{{=}}Some label}} || {{edit|2=Some label}}
|-
|{{tlx|edit|nobrackets{{=}}yes}} || {{edit|nobrackets=yes}}
|}
 
==Credits==
This template's code was taken from [[wikipedia:Template:Edit|Template:Edit]] on the English Wikipedia.
 
<includeonly>[[Category:General wiki templates|{{PAGENAME}}]]</includeonly><noinclude>
<noinclude>[[Category:Template documentation|{{PAGENAME}}]]</noinclude>