Template:Editlink: Difference between revisions

m
no edit summary
No edit summary
mNo edit summary
Line 1: Line 1:
;Description
Puts a small "e" edit link in a subscript-like position in a table cell. Intended for transcluded tables, but theoretically could be used for other things. See also {{t|sectioneditlink}} and {{t|tabledisplaylink}}.
:Puts a small "e" edit link in a subscript-like position in a table cell. Intended for transcluded tables, but theoretically could be used for other things.


;Syntax
;Usage
:<code>{{t|Tableeditlink|page to edit}}</code>
:{{t|editlink|page to edit}}
 
* 1= internal link page, like 'Template:Somenav'
;Parameters
* 2= (Optional) char or text to use as link. Default is 'e'.
* <code>1=</code> Internal link page (like <tt>Template:Somenav</tt>)
* color= (Optionaltext color link. Default is regular link color.
* <code>color=</code> ''Optional'' text color for "e"
* float= [both,right,left,none] (Optional)  Default is 'right'.
* <code>float=</code> ''Optional'' float (default: right)
* tight= [1] (Optional)  render the "e" that fits better in tight space, doesn't disturb flow.
* style= (Optional) additional style, like margins or as necessary.


;Example
;Example
<pre>
<pre>
{| class="darktable"
{| class="darktable" width="30%"
|-
|-
! Table with edit link {{tableeditlink|Template:Tableeditlink}}
! Table with edit link {{editlink|Template:editlink}}
|-
|-
| Cell 1
| Cell 1
|-
| Cell 2
|}
|}
</pre>
</pre>


;Output
{| class="darktable" width="30%"
{| class="darktable"
|-
|-
! Table with edit link {{tableeditlink|Template:Tableeditlink}}
! style="position:relative" | Table with edit link {{editlink|Template:editlink}}
|-
|-
| Cell 1
| Cell 1
|-
| Cell 2
|}
|}


;See also
<pre>
* {{t|sectioneditlink}}
:Some kind of heading {{editlink|Template:editlink}}
* {{t|tabledisplaylink}}
:I like unicorn.
:I like princess.
</pre>


:Some kind of heading {{editlink|Template:editlink}}
:I like unicorn.
:I like princess.


[[Category:Inline templates]]
----
----
;Template
;Template
<onlyinclude><span style="float:{{{float|right}}}; font-size:75%; font-weight:normal; margin-bottom:-6px; margin-top:6px;">[{{fullurl:{{{1|{{FULLPAGENAME}}}}}|action=edit}} {{#if:{{{color|}}}|<span style="color:{{{color|}}};">}}{{{2|e}}}{{#if:{{{color|}}}|</span>}}]</span></onlyinclude>
<onlyinclude><includeonly><!--
 
--><span style="font-weight:normal; {{#if:{{{tight|}}}|font-size:.76em; position:absolute; right:.2em; top:.2em;|font-size:.83em; float:{{{float|right}}}; margin:.2em 0 -2em 0;}} {{{style|}}}">[{{fullurl:{{{1|{{FULLPAGENAME}}}}}|action=edit}} {{#if:{{{color|}}}|<span style="color:{{{color|}}};">}}{{{2|e}}}{{#if:{{{color|}}}|</span>}}]</span><!--


[[Category:Inline templates]]
--></includeonly></onlyinclude>