Template:Refdef: Difference between revisions
Appearance
m searchable title |
make template:references optional / half-functional demo |
||
| Line 1: | Line 1: | ||
<onlyinclude><li id="cite_note-{{{name|}}}">↑ <span class="mw-cite-backlink">{{for||call=Template:RefJumpLink|pv=2|start=0|stop={{{J0|0}}}|by=1|pc1n=1|pc1v={{{1|}}}|pc2n=name|pc2v={{{name|}}}}}<span class="reference-text">{{{2|}}}</span></ | <includeonly><onlyinclude>{{#if:{{{A|}}}|<div class="mw-references-wrap"><ol class="references">}}<li id="cite_note-{{{name|}}}">↑ <span class="mw-cite-backlink">{{for||call=Template:RefJumpLink|pv=2|start=0|stop={{{J0|0}}}|by=1|pc1n=1|pc1v={{{1|}}}{{{A|}}}{{{Z|}}}|pc2n=name|pc2v={{{name|}}}}}</span><span class="reference-text">{{#if:{{{2|}}}|{{{2|}}}|{{{1|}}}}}</span></li>{{#if:{{{Z|}}}|</ol></div>}}</onlyinclude></includeonly><!-- | ||
--> | --> | ||
== Demo == | |||
simple for loop: {{for||call=Template:RefJumpLink|pv=1|text}} | |||
{{refdef|A=1|name=abc|J0=2|"Article". [https://www.wikidata.org/w/index.php?title{{=}}User:Reversedragon3/RefsTest wikidata.org]}} | |||
{{refdef| 2|name=abc|J0=2|"Article". [https://www.wikidata.org/w/index.php?title{{=}}User:Reversedragon3/RefsTest wikidata.org]}} | |||
{{refdef|Z=3|name=abc|J0=2|"Article". [https://www.wikidata.org/w/index.php?title{{=}}User:Reversedragon3/RefsTest wikidata.org]}} | |||
== Template parameters == | == Template parameters == | ||
* <code>name</code> - reference name | * <code>name</code> - reference name | ||
* <code>J0</code> - number of jump-up links, which will be displayed one by one using [[Template:for]]; this should be the [https://www.wikidata.org/w/index.php?q=Q2,89,20,044 | * <code>J0</code> - number of jump-up links, which will be displayed one by one using [[Template:for]]; this should be the [https://www.wikidata.org/w/index.php?q=Q2,89,20,044-positive_integer&title=Q28920044 whole number] of links [https://en.wikipedia.org/wiki/Zero-based_numbering minus 1]. | ||
* <code>1</code> - number of reference in list | * <code>1</code> - number of reference in list | ||
* <code>2</code> - reference text | * <code>2</code> - reference text | ||
[[Category:Templates for markup]] <!-- page ends here. | [[Category:Templates for markup]] {{ArticleTitle|h1=Template:refdef}} <!-- page ends here. | ||
original title on wikidata test: User:Reversedragon3/RefsTest/CiteNote | original title on wikidata test: User:Reversedragon3/RefsTest/CiteNote | ||
--> | --> | ||
Revision as of 09:32, 21 January 2026
Demo
simple for loop: Jump up to: text.
- ↑ Jump up to: "Article". [https://www.wikidata.org/w/index.php?title=User:Reversedragon3/RefsTest wikidata.org1.0] Jump up to: "Article". [https://www.wikidata.org/w/index.php?title=User:Reversedragon3/RefsTest wikidata.org1.1] Jump up to: "Article". [https://www.wikidata.org/w/index.php?title=User:Reversedragon3/RefsTest wikidata.org1.2] "Article". wikidata.org
- ↑ Jump up to: 2.0 Jump up to: 2.1 Jump up to: 2.2 "Article". wikidata.org
- ↑ Jump up to: "Article". [https://www.wikidata.org/w/index.php?title=User:Reversedragon3/RefsTest wikidata.org3.0] Jump up to: "Article". [https://www.wikidata.org/w/index.php?title=User:Reversedragon3/RefsTest wikidata.org3.1] Jump up to: "Article". [https://www.wikidata.org/w/index.php?title=User:Reversedragon3/RefsTest wikidata.org3.2] "Article". wikidata.org
Template parameters
name- reference nameJ0- number of jump-up links, which will be displayed one by one using Template:for; this should be the whole number of links minus 1.1- number of reference in list2- reference text