Template:Ref: Difference between revisions
(rewrote logic in order to *really* fix group and name parameters) |
(updated docs, removing note on need to escape '=' and '|') |
||
| (5 intermediate revisions by the same user not shown) | |||
| Line 2: | Line 2: | ||
#if:{{{name|}}} | #if:{{{name|}}} | ||
|{{ | |{{ | ||
#if:{{{group|}}} | #ifeq:{{{alpha}}} | ||
|yes | |||
|{{#tag:ref|{{{note|}}}|name={{{name}}}|group=lower-alpha}} | |||
|{{ | |||
#if:{{{group|}}} | |||
|{{#tag:ref|{{{note|}}}|name={{{name}}}|group={{{group}}}}} | |||
|{{#tag:ref|{{{note|}}}|name={{{name}}}}} | |||
}} | |||
}} | }} | ||
|{{ | |{{ | ||
#if:{{{group|}}} | #ifeq:{{{alpha}}} | ||
|yes | |||
|{{#tag:ref|{{{note|}}}|group=lower-alpha}} | |||
|{{ | |||
#if:{{{group|}}} | |||
|{{#tag:ref|{{{note|}}}|group={{{group}}}}} | |||
|{{#tag:ref|{{{note|}}}}} | |||
}} | |||
}} | }} | ||
}}</includeonly><noinclude> | }}</includeonly><noinclude> | ||
A shortcut for creating a reference in an article. Call this with the syntax <tt><nowiki>{{ref|Text of your reference.}}</nowiki></tt> to place a ref in an article, and then list the references at the end of the article using [[Template:Reflist]] | A shortcut for creating a reference in an article. Call this with the syntax <tt><nowiki>{{ref|note=Text of your reference.}}</nowiki></tt> to place a ref in an article, and then list the references at the end of the article using [[Template:Reflist]]. | ||
If you | If you plan to list the article's references in separate groups at the bottom of the article, use the "group" parameter to assign refs to each group: <tt><nowiki>{{ref|group=group_name|note=Text of your reference.}}</nowiki></tt>. See [[Oni]] for an example of using Ref and Reflist to do this. | ||
If you want your references to use letters instead of numbers, use <tt><nowiki>{{ref|alpha=yes|Text of your reference.}}</nowiki></tt>. | If you want your references to use letters instead of numbers, use <tt><nowiki>{{ref|alpha=yes|note=Text of your reference.}}</nowiki></tt>. See [[Quotes/Manual]] for an example of how to use Ref and Reflist to do this. | ||
[[Category:Basic formatting templates]]</noinclude> | [[Category:Basic formatting templates]]</noinclude> | ||
Latest revision as of 18:38, 18 February 2026
A shortcut for creating a reference in an article. Call this with the syntax {{ref|note=Text of your reference.}} to place a ref in an article, and then list the references at the end of the article using Template:Reflist.
If you plan to list the article's references in separate groups at the bottom of the article, use the "group" parameter to assign refs to each group: {{ref|group=group_name|note=Text of your reference.}}. See Oni for an example of using Ref and Reflist to do this.
If you want your references to use letters instead of numbers, use {{ref|alpha=yes|note=Text of your reference.}}. See Quotes/Manual for an example of how to use Ref and Reflist to do this.