Template:Refn/doc

Purpose
This template is used to create footnotes in Wikipedia, as an alternative and complement to the tag. Because of a technical limitation, some of the standard Wikipedia markup elements that are often used in the article prose do not work within a set of  tags, including but not limited to the pipe trick, template substitution and another "nested" set of  tags. For example, the following does not work as expected:
 * 1) Help:Footnotes (Generates: Help:Footnotes instead of a wikilink)
 * 2)  (Generates:  instead of the date that the edit was made)
 * 3) Explanatory footnote (Generates: Cite error: A &lt;ref&gt; tag is missing the closing &lt;/ref&gt; (see the help page). &lt;/ref&gt;)

Replacing the outermost  set with allows for the use of the markup elements listed above.

Usage

 * groupname: Groupname per WP:REFGROUP; if not specified, then the main and nested references will be rendered into the same reference list
 * name: Reference name per WP:REFNAME

Footnotes with Citations
{{markup Another example.{{refn|group=note|Another note. }} A third example.{{refn|group=note|The third note. }} Repeating the first example.{{refn|group=note|name=first}}
 * An example.{{refn|group=note|name=first|A note. }}

Substitution
The first example shows that substitution does not work in a regular  tag (the accessdate does not appear correctly). The second example shows that the accessdate is substituted correctly within refn.

Errors
If the reference or note content is missing, then "Cite error: Invalid tag; refs with no name must have content." will be displayed.