Template:Edit: Difference between revisions

missing " ; documentation; no longer WIP (although I probably add more properties later)
(talk page edit property)
(missing " ; documentation; no longer WIP (although I probably add more properties later))
 
Line 1: Line 1:
<includeonly><span class="plainlinks {{{class|}}}" title="{{{tooltip|Edit {{#ifeq: {{lc:{{{talk|}}}}} | yes | {{TALKPAGENAME:{{{1|{{FULLPAGENAME}}}}}}} | {{{1|{{FULLPAGENAME}}}}}}}}}}" style="{{{style|}}}>[{{fullurl:{{#ifeq: {{lc:{{{talk|}}}}} | yes | {{TALKPAGENAME:{{{1|{{FULLPAGENAME}}}}}}} | {{{1|{{FULLPAGENAME}}}}}}}|action=edit{{#if: {{{section|}}}|&section={{{section}}}}}{{#if: {{{preloadtitle|}}}|&preloadtitle={{urlencode:{{{preloadtitle}}}}}}}}} {{{text|edit}}}]</span></includeonly><noinclude>
<includeonly><span class="plainlinks {{{class|}}}" title="{{{tooltip|Edit {{#ifeq: {{lc:{{{talk|}}}}} | yes | {{TALKPAGENAME:{{{1|{{FULLPAGENAME}}}}}}} | {{{1|{{FULLPAGENAME}}}}}}}}}}" style="{{{style|}}}">[{{fullurl:{{#ifeq: {{lc:{{{talk|}}}}} | yes | {{TALKPAGENAME:{{{1|{{FULLPAGENAME}}}}}}} | {{{1|{{FULLPAGENAME}}}}}}}|action=edit{{#if: {{{section|}}}|&section={{{section}}}}}{{#if: {{{preloadtitle|}}}|&preloadtitle={{urlencode:{{{preloadtitle}}}}}}}}} {{{text|edit}}}]</span></includeonly><!--
{{UnderConstruction|Jovenan}}


Creates an edit link.</noinclude>
 
--><noinclude>{{Documentation|CONTENT=Creates an edit link.
 
== Usage ==
Basic usage:
<pre>{{edit}}</pre>
 
Full usage:
<pre>{{edit | | text = | talk = | section = | preloadtitle = | tooltip = | class = | style = }}</pre>
 
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 <code>section=new</code> 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'''
<pre>{{edit}}</pre>
 
{{edit}}
 
'''Edit another page, with different text'''
<pre>{{edit|118Wiki:Sand Box|text=Try editing in the sandbox!}}</pre>
 
{{edit|118Wiki:Sand Box|text=Try editing in the sandbox!}}
 
'''Add new section to talk page, with preloaded title'''
<pre>{{edit|talk=yes|section=new|preloadtitle=Testing the example|text=Ask a question}}</pre>
 
{{edit|talk=yes|section=new|preloadtitle=Testing the example|text=Ask a question}}
}}
[[Category:Wiki System Templates]]</noinclude>
1,765

edits