<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.runerealm.org/index.php?action=history&amp;feed=atom&amp;title=Template%3ARefn%2Fdoc</id>
	<title>Template:Refn/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.runerealm.org/index.php?action=history&amp;feed=atom&amp;title=Template%3ARefn%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://wiki.runerealm.org/index.php?title=Template:Refn/doc&amp;action=history"/>
	<updated>2026-04-30T10:25:37Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://wiki.runerealm.org/index.php?title=Template:Refn/doc&amp;diff=37380&amp;oldid=prev</id>
		<title>Alex: Created page with &quot;{{Documentation}} This template is for inserting references that may require more complex content than just plain text with links - the most common use-case is nesting references.  ;About Normal &lt;code&gt;&lt;nowiki&gt;&lt;ref&gt;&lt;/nowiki&gt;&lt;/code&gt; tags cannot directly contain any parser/preprocessor functions. This includes standard parser functions, particularly &lt;code&gt;&lt;nowiki&gt;#if&lt;/nowiki&gt;&lt;/code&gt; and similar, as well as other &lt;code&gt;&lt;nowiki&gt;&lt;ref&gt;&lt;/nowiki&gt;&lt;/code&gt; tags. For parser functions...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.runerealm.org/index.php?title=Template:Refn/doc&amp;diff=37380&amp;oldid=prev"/>
		<updated>2024-10-16T23:43:52Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Documentation}} This template is for inserting references that may require more complex content than just plain text with links - the most common use-case is nesting references.  ;About Normal &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;ref&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; tags cannot directly contain any parser/preprocessor functions. This includes standard parser functions, particularly &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;#if&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and similar, as well as other &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;ref&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; tags. For parser functions...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Documentation}}&lt;br /&gt;
This template is for inserting references that may require more complex content than just plain text with links - the most common use-case is nesting references.&lt;br /&gt;
&lt;br /&gt;
;About&lt;br /&gt;
Normal &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;ref&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; tags cannot directly contain any parser/preprocessor functions. This includes standard parser functions, particularly &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;#if&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and similar, as well as other &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;ref&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; tags. For parser functions, a way to counter this is to use a template to abstract the function. An alternative method is to use the &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;#tag&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; parser function - which is what this template does, more cleanly.&lt;br /&gt;
&lt;br /&gt;
In addition, preprocessor extensions (like &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;ref&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; tags) must be nested in this way.&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
&amp;lt;pre&amp;gt;{{Refn|reference content}}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Refn also supports the two most commonly used extra parameters, &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;group&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;{{Refn|reference content|name=ref name|group=ref group}}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Nesting&lt;br /&gt;
As mentioned, the most common use-case is nesting references. When nesting references, the outer &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;ref&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; tags must be replaced by this template - the innermost tag can remain a &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;ref&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; tag, but Refn cannot be inside a &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;ref&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; tag at all. The standardised CiteX templates (e.g. [[Template:CiteGeneral]]) all utilise this method already, so are nestable.&lt;br /&gt;
&amp;lt;pre&amp;gt;{{Refn|outer reference content{{Refn|nested reference for the outer reference content}}}}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the references will be in ordered in parsing order, which is the innermost to the outermost - this is generally not the most logical order for reading, so making footnotes of footnotes or citations of citations is not advised - mix groups.&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
;Markup&lt;br /&gt;
&amp;lt;pre&amp;gt;* text {{Refn|reference content 1}}&lt;br /&gt;
* text 2 {{Refn|outer reference content{{Refn|nested reference for the outer reference content}}}}&lt;br /&gt;
* text 3 {{Refn|outer refn&amp;lt;ref&amp;gt;inner reftag&amp;lt;/ref&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
;Reflist&lt;br /&gt;
&amp;lt;references /&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
;Result&lt;br /&gt;
* text {{Refn|reference content 1}}&lt;br /&gt;
* text 2 {{Refn|outer reference content{{Refn|nested reference for the outer reference content}}}}&lt;br /&gt;
* text 3 {{Refn|outer refn&amp;lt;ref&amp;gt;inner reftag&amp;lt;/ref&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
;Reflist&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here you can clearly see the inner tags sorted before the outer tags.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* {{wp|Template:Refn|This template on Wikipedia}}&lt;br /&gt;
&lt;br /&gt;
{{Citations}}&lt;br /&gt;
&amp;lt;includeonly&amp;gt;[[Category:Reference templates]]&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Alex</name></author>
	</entry>
</feed>