<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.stiles.casa/index.php?action=history&amp;feed=atom&amp;title=Module%3ARedirect%2Fsandbox%2Fdoc</id>
	<title>Module:Redirect/sandbox/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.stiles.casa/index.php?action=history&amp;feed=atom&amp;title=Module%3ARedirect%2Fsandbox%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://wiki.stiles.casa/index.php?title=Module:Redirect/sandbox/doc&amp;action=history"/>
	<updated>2026-05-07T03:49:44Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.2</generator>
	<entry>
		<id>https://wiki.stiles.casa/index.php?title=Module:Redirect/sandbox/doc&amp;diff=6863&amp;oldid=prev</id>
		<title>imported&gt;Wnt: ←Created page with &#039;{{used in system}} {{Module rating|beta}} == Main function == The &#039;main&#039; function of this module accepts the name of a single page.  It determines if the page is...&#039;</title>
		<link rel="alternate" type="text/html" href="https://wiki.stiles.casa/index.php?title=Module:Redirect/sandbox/doc&amp;diff=6863&amp;oldid=prev"/>
		<updated>2013-11-22T17:58:32Z</updated>

		<summary type="html">&lt;p&gt;&lt;a href=&quot;/index.php?title=Stiles_Wiki:AES&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Stiles Wiki:AES (page does not exist)&quot;&gt;←&lt;/a&gt;Created page with &amp;#039;{{used in system}} {{Module rating|beta}} == Main function == The &amp;#039;main&amp;#039; function of this module accepts the name of a single page.  It determines if the page is...&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{used in system}}&lt;br /&gt;
{{Module rating|beta}}&lt;br /&gt;
== Main function ==&lt;br /&gt;
The &amp;#039;main&amp;#039; function of this module accepts the name of a single page.  It determines if the page is a redirect; if so it looks up the page, extracts the target, and returns the target name as text. Its usage is &amp;lt;nowiki&amp;gt;{{#invoke:redirect|main|redirect-page-name}}&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The template normally neither takes nor gives square brackets, so to show the result as a link use &amp;lt;nowiki&amp;gt;[[{{#invoke:redirect|main|redirect-page-name}}]]&amp;lt;/nowiki&amp;gt;.  An error is produced if the redirect does not exist, but for versatility no error is given if the file is not a redirect (returns the original text) or if the file name is blank (returns blank).&lt;br /&gt;
&lt;br /&gt;
However, if the parameter &amp;#039;&amp;#039;bracket&amp;#039;&amp;#039; is given a nonblank value, brackets will be passed on if present.&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
&amp;#039;&amp;#039;See [[Module:Redirect/testcases]]&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;{{#invoke:redirect|main|SW:AFC}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
produces&lt;br /&gt;
&lt;br /&gt;
{{#invoke:redirect|main|SW:AFC}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;{{#invoke:redirect|main|[[SW:AFD]]|bracket=yes}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
produces&lt;br /&gt;
&lt;br /&gt;
{{#invoke:redirect|main|[[SW:AFD]]|bracket=yes}}&lt;br /&gt;
&lt;br /&gt;
If the target isnt a redirect:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;{{#invoke:redirect|main|Stiles.casa Wiki:Articles for deletion|}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
produces&lt;br /&gt;
&lt;br /&gt;
{{#invoke:redirect|main|Stiles.casa Wiki:Articles for deletion|}}&lt;br /&gt;
&lt;br /&gt;
== Block function ==&lt;br /&gt;
The &amp;#039;block&amp;#039; function replaces redirects with the actual names of articles in text entered either directly (using the &amp;#039;&amp;#039;text=&amp;#039;&amp;#039; parameter) or by specifying the name of an index page in the first unlabelled parameter.  Because checking for redirects is [[SW:expensive]], it only checks a limited number of links, so a feature is given to start only after reaching a link with a particular name.  There is also a feature to limit replacements to piped links (&amp;lt;nowiki&amp;gt;[[A|B]]&amp;lt;/nowiki&amp;gt; or unpiped links, or to make a piped link when an unpiped link is changed.  This allows it to be used to make limited substitutions in articles without disrupting the text.&lt;br /&gt;
&lt;br /&gt;
=== parameters ===&lt;br /&gt;
* &amp;#039;&amp;#039;1 =&amp;#039;&amp;#039; provides the name of the page containing the multiple redirects to process.  Ignored if &amp;#039;&amp;#039;text&amp;#039;&amp;#039; is specified.&lt;br /&gt;
* &amp;#039;&amp;#039;text =&amp;#039;&amp;#039; (or unnamed first parameter) provides a text on which to do substitutions&lt;br /&gt;
* &amp;#039;&amp;#039;2 =&amp;#039;&amp;#039; (or unnamed second parameter) specifies the name of a wikilink (given in its original form, perhaps a redirect) at which to begin substitutions.&lt;br /&gt;
* &amp;#039;&amp;#039;pipe =&amp;#039;&amp;#039;&lt;br /&gt;
:* If omitted, all links are processed: &amp;lt;nowiki&amp;gt;[[A]] -&amp;gt; [[X]], [[A|B]] -&amp;gt; [[X|B]]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:* If &amp;#039;&amp;#039;no&amp;#039;&amp;#039;, unpiped links are processed: &amp;lt;nowiki&amp;gt;[[A]] -&amp;gt; [[X]], [[A|B]] -&amp;gt; [[A|B]]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:* If &amp;#039;&amp;#039;yes&amp;#039;&amp;#039;, piped links are processed: &amp;lt;nowiki&amp;gt;[[A]] -&amp;gt; [[A]], [[A|B]] -&amp;gt; [[X|B]]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:* If &amp;#039;&amp;#039;make&amp;#039;&amp;#039;, all links are processed, pipes are added on rename if absent: &amp;lt;nowiki&amp;gt;[[A]] -&amp;gt; [[A|X]], [[A|B]] -&amp;gt; [[X|B]]&amp;lt;/nowiki&amp;gt;.  Note that &amp;#039;&amp;#039;make&amp;#039;&amp;#039; is the setting most practical for article text to be subsequently screened for duplicate wikilinks.&lt;br /&gt;
* &amp;#039;&amp;#039;nowiki =&amp;#039;&amp;#039; (set to &amp;#039;no&amp;#039; if some processing of the output is desired; usually you don&amp;#039;t want this)&lt;br /&gt;
&lt;br /&gt;
=== examples ===&lt;br /&gt;
See [[Module talk:Redirect/sandbox/testcases]]&lt;/div&gt;</summary>
		<author><name>imported&gt;Wnt</name></author>
	</entry>
</feed>