Difference between revisions of "Template:Footnote"
Jump to navigation
Jump to search
m |
m (minor logic bug) |
||
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
< | <includeonly>{{#if:{{#if:{{{handle|}}}|{{#if:{{#var:fnu_{{{handle|}}}}}||{{{1|}}}}}|{{{1|}}}}}|{{#vardefine:footnotes|{{#var:footnotes}} | ||
<li id="footnote_{{#vardefineecho:footnotescount|{{#expr:{{#var:footnotescount}}+1}}}}" style="{{NewStyle|page-break-inside|avoid|moz=*|webkit=*}}"><span class="TablePager_nav">'''[[#fn_{{#var:footnotescount}}|^]]'''</span> {{{1}}}}}{{#vardefineecho:fnu_{{{handle|}}}|{{Footnote/wrap|fn_{{#var:footnotescount}}|[[#footnote_{{#var:footnotescount}}|[{{#var:footnotescount}}]]]|3={{#if:{{{2|}}}|{{{2|}}}|{{{1}}}}}}}}}|{{#if:{{{handle|}}}|{{#var:fnu_{{{handle|}}}}}}}}}</includeonly><noinclude> | |||
{{hint | {{hint | ||
|mode=important | |mode=important | ||
|desc=This is one of the geekiest templates in this Wiki and it's an awesome piece of code.<br>Though finally, the [http://www.mediawiki.org/wiki/Extension:Cite/ | |desc=This is one of the geekiest templates in this Wiki and it's an awesome piece of code.<br>Though finally, the [http://www.mediawiki.org/wiki/Extension:Cite/Cite.php Cite] extension rendered it obsolete. Consider using <nowiki><ref>reference</ref></nowiki> and <nowiki><references /></nowiki> instead of this template. | ||
}} | }} | ||
Line 20: | Line 21: | ||
{{Footnote|handle=id}} - Inserts a link to a multi-use footnote. | {{Footnote|handle=id}} - Inserts a link to a multi-use footnote. | ||
</pre> | </pre> | ||
'''handle''' needs to be unique to the page, if it is not, | '''handle''' needs to be unique to the page, if it is not, later redeclarations will be ignored. | ||
Don't forget to include the <code><nowiki>{{Footnotes}}</nowiki></code> template where you want the table of footnotes. If you want multiple columns of footnotes use <code><nowiki>{{Footnotes|col=number_of_columns}}</nowiki></code> | Don't forget to include the <code><nowiki>{{Footnotes}}</nowiki></code> template where you want the table of footnotes. If you want multiple columns of footnotes use <code><nowiki>{{Footnotes|col=number_of_columns}}</nowiki></code> | ||
</noinclude> | </noinclude> |
Latest revision as of 11:54, 6 November 2013
Important! | |
This is one of the geekiest templates in this Wiki and it's an awesome piece of code. |
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua[1][1][1].
- ^ http://www.lipsum.com/ Lorem Ipsum - All the facts - Lipsum generator
Syntax
{{Footnote|Footnote text}} - Creates a single use footnote {{Footnote|Footnote text|Hover text}} - Creates a single use footnote with different hover text {{Footnote|Footnote text|handle=id}} - Creates a multi-use footnote {{Footnote|Footnote text|Hover text|handle=id}} - Creates a multi-use footnote with different hover text {{Footnote|handle=id}} - Inserts a link to a multi-use footnote.
handle needs to be unique to the page, if it is not, later redeclarations will be ignored.
Don't forget to include the {{Footnotes}}
template where you want the table of footnotes. If you want multiple columns of footnotes use {{Footnotes|col=number_of_columns}}