<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://pool.calebcooper.ie/index.php?action=history&amp;feed=atom&amp;title=Template%3AURL2%2Fdoc</id>
	<title>Template:URL2/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://pool.calebcooper.ie/index.php?action=history&amp;feed=atom&amp;title=Template%3AURL2%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://pool.calebcooper.ie/index.php?title=Template:URL2/doc&amp;action=history"/>
	<updated>2026-04-08T02:27:43Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://pool.calebcooper.ie/index.php?title=Template:URL2/doc&amp;diff=13513&amp;oldid=prev</id>
		<title>Caleb Cooper: Created page with &quot;{{Documentation subpage}} &lt;!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see Wikipedia:Wikidata) --&gt; {{Lua|Module:URL}...&quot;</title>
		<link rel="alternate" type="text/html" href="https://pool.calebcooper.ie/index.php?title=Template:URL2/doc&amp;diff=13513&amp;oldid=prev"/>
		<updated>2020-10-21T18:10:42Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Documentation subpage}} &amp;lt;!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see &lt;a href=&quot;https://en.wikipedia.org/wiki/Wikidata&quot; class=&quot;extiw&quot; title=&quot;wikipedia:Wikidata&quot;&gt;Wikipedia:Wikidata&lt;/a&gt;) --&amp;gt; {{Lua|Module:URL}...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Documentation subpage}}&lt;br /&gt;
&amp;lt;!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --&amp;gt;&lt;br /&gt;
{{Lua|Module:URL}}&lt;br /&gt;
{{Commons Import}}&lt;br /&gt;
&lt;br /&gt;
This is a fork of [[Template:URL]] for use in infoboxes.&lt;br /&gt;
&lt;br /&gt;
It behaves similarly to {{tl|URL}} with the following exceptions:&lt;br /&gt;
* By default it does not display anything if the parameters are blank or omitted. [[Template:URL]] displays {{URL}} by default.&lt;br /&gt;
* It implements a parameter {{para|msg}} that turns on or off the message {{url}}. Setting msg to false or anything beginning with n or N will suppress the message. Anything else enables the message.&lt;br /&gt;
* It strips html tags and wiki-link markup from the supplied url parameter.&lt;br /&gt;
* It truncates the url parameter at the first space it finds.&lt;br /&gt;
* It can take its own output as input, allowing website parameters to be wrapped in {{URL2}} in the design of an infobox, without causing problems if editors add &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;|website={{URL|some.url.com}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; in an article.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{URL2|&amp;lt;/nowiki&amp;gt;&amp;lt;var&amp;gt;url&amp;lt;/var&amp;gt;&amp;lt;nowiki&amp;gt;}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{URL2|1=&amp;lt;/nowiki&amp;gt;&amp;lt;var&amp;gt;url&amp;lt;/var&amp;gt;&amp;lt;nowiki&amp;gt;}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Different from Template:URL ===&lt;br /&gt;
If there is no input, the default behavior of URL2 is to display nothing (use {{para|msg}} to display the instructional message):&lt;br /&gt;
{{nowiki template demo|format=inline|code=&amp;lt;nowiki&amp;gt;{{URL2| }}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
{{nowiki template demo|format=inline|code=&amp;lt;nowiki&amp;gt;{{URL2|msg=yes| }}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
{{nowiki template demo|format=inline|code=&amp;lt;nowiki&amp;gt;{{URL2|msg=true| }}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
URL2 handles formatting commonly found in the {{para|website}} parameter of an infobox:&lt;br /&gt;
{{nowiki template demo|format=inline|code=&amp;lt;nowiki&amp;gt;{{URL2|[http://www.example.com]}}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
{{nowiki template demo|format=inline|code=&amp;lt;nowiki&amp;gt;{{URL2|http://www.example.com|website}}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
{{nowiki template demo|format=inline|code=&amp;lt;nowiki&amp;gt;{{URL2|{{URL|www.example.com}}}}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
{{nowiki template demo|format=inline|code=&amp;lt;nowiki&amp;gt;{{URL2|{{URL2|www.example.com}}}}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
=== Same as Template:URL ===&lt;br /&gt;
The template wraps the output in {{tag|span|attribs=class=&amp;quot;url&amp;quot;}} (see {{Section link||Microformat}}) and adds [[HTML element#wbr|&amp;amp;lt;wbr/&amp;amp;gt;]] before displayed periods:&lt;br /&gt;
{{nowiki template demo|format=inline|output=nowiki+|code=&amp;lt;nowiki&amp;gt;{{URL2|www.example.com}}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
The use of [[HTTP|http://]], [[HTTPS|https://]], a [[URL#prurl|protocol-relative URL]], or a different protocol is preserved in the URL but is not shown in the [[link text]]:&lt;br /&gt;
{{nowiki template demo|format=inline|output=nowiki+|code=&amp;lt;nowiki&amp;gt;{{URL2|http://www.example.com}}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
{{nowiki template demo|format=inline|output=nowiki+|code=&amp;lt;nowiki&amp;gt;{{URL2|https://www.example.com}}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
{{nowiki template demo|format=inline|output=nowiki+|code=&amp;lt;nowiki&amp;gt;{{URL2|//www.example.com}}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
{{nowiki template demo|format=inline|output=nowiki+|code=&amp;lt;nowiki&amp;gt;{{URL2|ftp://ftp.example.com}}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
If the path is only a slash (&amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;) it is not displayed in the link text:&lt;br /&gt;
{{nowiki template demo|format=inline|output=nowiki+|code=&amp;lt;nowiki&amp;gt;{{URL2|https://www.example.com/}}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
The template also adds [[HTML element#wbr|&amp;amp;lt;wbr/&amp;amp;gt;]] before any displayed slashes (&amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;) in the path:&lt;br /&gt;
{{nowiki template demo|format=inline|output=nowiki+|code=&amp;lt;nowiki&amp;gt;{{URL2|https://www.example.com/path}}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
For a URL containing an equal sign (&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;), use {{para|1}}:&lt;br /&gt;
{{nowiki template demo|format=inline|output=nowiki+|code=&amp;lt;nowiki&amp;gt;{{URL2|1=http://www.example.com/path?section=17}}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
== Microformat ==&lt;br /&gt;
The template wraps the &amp;#039;&amp;#039;displayed&amp;#039;&amp;#039; URL with &amp;lt;code&amp;gt;class=&amp;quot;url&amp;quot;&amp;lt;/code&amp;gt; so that it is included in any parent [[microformat]] which takes a URL parameter - see [[Wikipedia:WikiProject Microformats]].&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* {{tl|URL}}&lt;br /&gt;
For more detail see wikipedia page [[wikipedia:Template:URL2]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{sandbox other||&lt;br /&gt;
&amp;lt;!-- Categories below this line, please; interwikis at Wikidata --&amp;gt;&lt;br /&gt;
[[Category:External link templates]]&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Caleb Cooper</name></author>
	</entry>
</feed>