Template:Ref: Difference between revisions
(Created page with "<includeonly>{{#tag:ref|{{#if:{{{group|}}}|{{#ifeq:{{{group}}}|lower-alpha||<cite class="{{{group}}}">}}}}{{{1}}}{{#if:{{{group|}}}|{{#ifeq:{{{group}}}|lower-alpha||</cite>}}}}|name={{{name|}}}|group={{#ifeq:{{{alpha}}}|yes|lower-alpha|{{{group|}}}}}}}</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...") |
(added note about need to escape '=' and '|') |
||
Line 1: | Line 1: | ||
<includeonly>{{#tag:ref|{{#if:{{{group|}}}|{{#ifeq:{{{group}}}|lower-alpha||<cite class="{{{group}}}">}}}}{{{1}}}{{#if:{{{group|}}}|{{#ifeq:{{{group}}}|lower-alpha||</cite>}}}}|name={{{name|}}}|group={{#ifeq:{{{alpha}}}|yes|lower-alpha|{{{group|}}}}}}}</includeonly><noinclude> | <includeonly>{{#tag:ref|{{#if:{{{group|}}}|{{#ifeq:{{{group}}}|lower-alpha||<cite class="{{{group}}}">}}}}{{{1}}}{{#if:{{{group|}}}|{{#ifeq:{{{group}}}|lower-alpha||</cite>}}}}|name={{{name|}}}|group={{#ifeq:{{{alpha}}}|yes|lower-alpha|{{{group|}}}}}}}</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|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 the text that you pass in contains a '=' or '|' (pipe), you need to escape them because they have special meanings in template calls. The equals sign is escaped with the use of <tt><nowiki>{{=}}</nowiki></tt> and the pipe with <tt><nowiki>{{!}}</nowiki></tt>. | ||
If you want to only list ref tags in a certain group, use the "group" parameter: <tt><nowiki>{{ref|group=group_name|Text of your reference.}}</nowiki></tt>. See [[Oni]] for an example usage. | If you want to only list ref tags in a certain group, use the "group" parameter: <tt><nowiki>{{ref|group=group_name|Text of your reference.}}</nowiki></tt>. See [[Oni]] for an example usage. |
Revision as of 03:00, 23 April 2025
A shortcut for creating a reference in an article. Call this with the syntax {{ref|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 the text that you pass in contains a '=' or '|' (pipe), you need to escape them because they have special meanings in template calls. The equals sign is escaped with the use of {{=}} and the pipe with {{!}}.
If you want to only list ref tags in a certain group, use the "group" parameter: {{ref|group=group_name|Text of your reference.}}. See Oni for an example usage.
If you want your references to use letters instead of numbers, use {{ref|alpha=yes|Text of your reference.}}.