<?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%3ADocumentation%2Fdoc</id>
	<title>Template:Documentation/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%3ADocumentation%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://pool.calebcooper.ie/index.php?title=Template:Documentation/doc&amp;action=history"/>
	<updated>2026-04-10T08:13:20Z</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:Documentation/doc&amp;diff=13423&amp;oldid=prev</id>
		<title>Caleb Cooper: Text replacement - &quot;CSS&quot; to &quot;CSS&quot;</title>
		<link rel="alternate" type="text/html" href="https://pool.calebcooper.ie/index.php?title=Template:Documentation/doc&amp;diff=13423&amp;oldid=prev"/>
		<updated>2020-10-21T16:28:39Z</updated>

		<summary type="html">&lt;p&gt;Text replacement - &amp;quot;&lt;a href=&quot;/index.php?title=Cascading_Style_Sheets&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Cascading Style Sheets (page does not exist)&quot;&gt;CSS&lt;/a&gt;&amp;quot; to &amp;quot;&lt;a href=&quot;https://en.wikipedia.org/wiki/Cascading_Style_Sheets&quot; class=&quot;extiw&quot; title=&quot;wikipedia:Cascading Style Sheets&quot;&gt;CSS&lt;/a&gt;&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{template shortcut|doc}}&lt;br /&gt;
&amp;lt;noinclude&amp;gt;{{pp-semi-indef}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;{{Distinguish|Template:Documentation subpage}}&lt;br /&gt;
{{Documentation subpage}}&lt;br /&gt;
{{High-use}}&lt;br /&gt;
{{stack|{{Lua|Module:Documentation}}}}&lt;br /&gt;
&amp;lt;!---- Categories where indicated at the bottom of this page, please; interwikis at Wikidata ----&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is the &amp;#039;&amp;#039;&amp;#039;{{tlf|Documentation}}&amp;#039;&amp;#039;&amp;#039; template used on almost every [[Help:A quick guide to templates|template page]] to contain that template&amp;#039;s documented instructions and information, including [[Wikipedia:TemplateData|&amp;lt;templatedata&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
For detailed instructions on how and when to use this template, see [[Wikipedia:Template documentation]]&lt;br /&gt;
&lt;br /&gt;
This template displays a green documentation box like you are seeing now and automatically loads the content from a /doc subpage. It can also load the content from other places if instructed to.&lt;br /&gt;
&lt;br /&gt;
This template is intended for documenting templates and other pages that are [[Wikipedia:Transclusion|transcluded]] onto other pages. It can be used in the [[Wikipedia:Template namespace|template namespace]] and most other [[Wikipedia:Namespace|namespace]]s.&lt;br /&gt;
&lt;br /&gt;
Use of this template allows templates to be [[Wikipedia:Protection policy|protected]] where necessary, while allowing anyone to edit the documentation and categories.&lt;br /&gt;
&lt;br /&gt;
===Usage===&lt;br /&gt;
Normally this template is used without any parameters, placed at the bottom of the template or page being documented, within a {{tag|noinclude}} container:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml+smarty&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--Last line of your template code--&amp;gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{Documentation}}&lt;br /&gt;
&amp;lt;!-- Add categories to the /doc subpage, interwikis to Wikidata, not here --&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then this template automatically loads the content from the /doc subpage of the template it is used on.&lt;br /&gt;
&lt;br /&gt;
This template can also load the content from any other page. Like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml+smarty&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--Last line of your template code--&amp;gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{Documentation |Template:Other page/doc}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that when loading the documentation from a page other than the local /doc page it becomes tricky to handle the categories.&lt;br /&gt;
&lt;br /&gt;
The content can also be fed directly as text. Like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml+smarty&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--Last line of your template code--&amp;gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{Documentation&lt;br /&gt;
 | content =&lt;br /&gt;
(some documentation)&lt;br /&gt;
}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the {{para|content}} parameter is used, the doc box normally does not show the [edit] [purge] links in the top right corner. Note that if the /doc page exists, a link to it is still shown in the link box below the doc box.&lt;br /&gt;
&lt;br /&gt;
Parameter {{para|1}} and the {{para|content}} parameter can also be combined, like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml+smarty&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--Last line of your template code--&amp;gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{Documentation |1=Template:Any page/doc&lt;br /&gt;
| content =&lt;br /&gt;
{{Template:Any page/doc |parameters}}&lt;br /&gt;
}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then the pagename fed as parameter 1 is used for the [edit] [purge] links and for the /doc link in the link box below the doc box. But the &amp;#039;&amp;#039;&amp;#039;content&amp;#039;&amp;#039;&amp;#039; parameter is used for the content shown in the doc box. The above code means that the content is transcluded as {{tnull|Template:Any page/doc{{!}}parameters}}. In this example a parameter is also fed to the /doc page being loaded.&lt;br /&gt;
&lt;br /&gt;
===Place and tags===&lt;br /&gt;
This code should be added at the bottom of the template code, with no space before {{Tag|noinclude|o}} (which would cause extra space on pages where the template is used): &amp;lt;syntaxhighlight lang=moin&amp;gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{documentation}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To automatically insert the [[Wikipedia:Noinclude|noinclude tags]], the template call and the guiding comment, you can also use this [[Wikipedia:Substitution|substitution]] code shortcut:&lt;br /&gt;
&lt;br /&gt;
{{tlxs|doc-code}}&lt;br /&gt;
&lt;br /&gt;
Which results in: &amp;lt;syntaxhighlight lang=moin&amp;gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{documentation}}&lt;br /&gt;
&amp;lt;!-- Add categories to the /doc subpage and interwikis in Wikidata, not here! --&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Best practice===&lt;br /&gt;
Categories that apply to the template itself should be added to the bottom of the /doc subpage, inside {{tag|noinclude|p|content={{((}}Sandbox other{{!!}}...{{))}}}}.  Interwiki links that apply to the template should be listed at [[d:|Wikidata]] (more at [[Wikipedia:Wikidata]]).  For more complex cases, see [[Wikipedia:Template documentation#Categories and interwiki links]].&lt;br /&gt;
&lt;br /&gt;
If the documentation page contains {{tag|includeonly|o}} or {{tag|noinclude|o}} tags as part of the visible documentation text, replace the &amp;quot;&amp;lt;code&amp;gt;&amp;amp;lt;&amp;lt;/code&amp;gt;&amp;quot; with &amp;quot;&amp;lt;code&amp;gt;&amp;amp;amp;lt;&amp;lt;/code&amp;gt;&amp;quot; or use [[Template:tag]].&lt;br /&gt;
&lt;br /&gt;
===Heading===&lt;br /&gt;
When in the Template namespace, this template shows this heading:&lt;br /&gt;
:[[File:Test Template Info-Icon - Version (2).svg|32px|link=[[Wikipedia:Template documentation]]]] &amp;#039;&amp;#039;&amp;#039;Template documentation&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In most other namespaces, such as &amp;quot;Wikipedia:&amp;quot;, it shows this heading:&lt;br /&gt;
:&amp;#039;&amp;#039;&amp;#039;Documentation&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
But when on File (image) pages it shows this heading:&lt;br /&gt;
:&amp;#039;&amp;#039;&amp;#039;Summary&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;heading&amp;#039;&amp;#039;&amp;#039; parameter can be used to set the heading to something else. Like this:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{Documentation |heading=Infobox documentation}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the &amp;#039;&amp;#039;&amp;#039;heading&amp;#039;&amp;#039;&amp;#039; parameter is empty but defined, no heading is shown and no [edit] [purge] links are shown. Like this:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{Documentation |heading=}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;heading-style&amp;#039;&amp;#039;&amp;#039; parameter can be fed optional [[Wikipedia:Cascading Style Sheets|CSS]] values. Without quotation marks &amp;lt;code&amp;gt;&amp;quot; &amp;quot;&amp;lt;/code&amp;gt; but with the ending semicolons &amp;lt;code&amp;gt;;&amp;lt;/code&amp;gt;. For example:&lt;br /&gt;
:&amp;lt;code&amp;gt;heading-style=font-size:150%;color:red;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Link box===&lt;br /&gt;
Below the big doc box is a small link box that shows some meta-data about the documentation. The link box shows different things depending on what parameters are fed to this template, and in which namespace it is used. In some cases the link box is not shown at all.&lt;br /&gt;
&lt;br /&gt;
To hide the link box, add the parameter&lt;br /&gt;
: {{para|link box|off}}.&lt;br /&gt;
&lt;br /&gt;
You can also insert customised text into the link box, by setting the {{para|link box}} parameter. For example:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:auto; overflow:scroll&amp;quot;&amp;gt;&lt;br /&gt;
  |link box=This documentation is automatically generated by [[Template:Country showdata]]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Subject namespaces vs. talk namespaces===&lt;br /&gt;
Terminology: &amp;#039;&amp;#039;Subject namespaces&amp;#039;&amp;#039; are the opposite of &amp;#039;&amp;#039;talk namespaces&amp;#039;&amp;#039;. For instance &amp;quot;Template:&amp;quot; is the subject space of &amp;quot;Template talk:&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This template is usually placed in a subject namespace, within {{tag|noinclude|o}} tags. But in some cases this template needs to be on the talk page:&lt;br /&gt;
&lt;br /&gt;
* In the Mediawiki namespace, since {{tag|noinclude|}} often does not work in system messages, and since the Mediawiki namespace needs to be kept clean for performance reasons.&lt;br /&gt;
&lt;br /&gt;
When placed on talk pages, this template usually is placed near the top of the page and without {{tag|noinclude}} tags.&lt;br /&gt;
&lt;br /&gt;
The /doc, /sandbox and /testcases pages should normally be in the subject namespace, except in the namespaces that do not have the MediaWiki [[meta:Help:Link#Subpage feature|subpage feature]] enabled: Main, File, Mediawiki and Category. (But currently we only show the /sandbox and /testcases links from User, User talk, Template and Template talk namespaces.) There are also a whole bunch of other technical reasons why the /doc page must be stored under the talk page for those (but only those) namespaces.&lt;br /&gt;
&lt;br /&gt;
This template automatically points its [create] links for the /doc, /sandbox and /testcases to the right namespace.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Full syntax====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{Documentation}}&lt;br /&gt;
&lt;br /&gt;
{{Documentation&lt;br /&gt;
 | content =&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Documentation&lt;br /&gt;
| [path to documentation page]&lt;br /&gt;
| heading-style = &lt;br /&gt;
| heading = &lt;br /&gt;
| link box = &lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===See also===&lt;br /&gt;
* {{tl|Documentation subpage}}, a notice placed at the top of a /doc subpage explaining its role and including a link to the page it documents.&lt;br /&gt;
* [[Wikipedia:Template documentation]] is a how-to guide to template documentation.&lt;br /&gt;
* [[Wikipedia:Template sandbox and test cases]] explains the use of /sandbox and /testcases subpages and includes more information about template testing.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;&amp;lt;!-- Make sure that only page [[Template:Documentation]] is categorised. No other page (no subpages, not when transcluded).&lt;br /&gt;
 --&amp;gt;{{#ifeq:{{FULLPAGENAME}}|Template:Documentation|&lt;br /&gt;
[[Category:Template documentation| ]]&lt;br /&gt;
[[Category:Template namespace templates|Documentation]]&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Caleb Cooper</name></author>
	</entry>
</feed>