<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://w8md.com/w/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://w8md.com/w/index.php?action=history&amp;feed=atom&amp;title=Template%3ADocumentation%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://w8md.com/w/index.php?title=Template:Documentation/doc&amp;action=history"/>
	<updated>2026-08-30T23:32:10Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.1</generator>
	<entry>
		<id>https://w8md.com/w/index.php?title=Template:Documentation/doc&amp;diff=6413&amp;oldid=prev</id>
		<title>Prab: Created page with &quot;{{Short description|Documentation subpage for the W8MD Documentation template}} {{DISPLAYTITLE:Template:Documentation/doc}}  &#039;&#039;&#039;Template:Documentation&#039;&#039;&#039; is a helper template used on W8MD.com to display documentation for templates from a separate documentation subpage, usually named &lt;code&gt;/doc&lt;/code&gt;.  This template helps keep active template code separate from instructions, examples, parameter descriptions, and categories. It is especially useful for frequently used W8M...&quot;</title>
		<link rel="alternate" type="text/html" href="https://w8md.com/w/index.php?title=Template:Documentation/doc&amp;diff=6413&amp;oldid=prev"/>
		<updated>2026-07-06T03:04:21Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Short description|Documentation subpage for the W8MD Documentation template}} {{DISPLAYTITLE:Template:Documentation/doc}}  &amp;#039;&amp;#039;&amp;#039;Template:Documentation&amp;#039;&amp;#039;&amp;#039; is a helper template used on W8MD.com to display documentation for templates from a separate documentation subpage, usually named &amp;lt;code&amp;gt;/doc&amp;lt;/code&amp;gt;.  This template helps keep active template code separate from instructions, examples, parameter descriptions, and categories. It is especially useful for frequently used W8M...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Short description|Documentation subpage for the W8MD Documentation template}}&lt;br /&gt;
{{DISPLAYTITLE:Template:Documentation/doc}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Template:Documentation&amp;#039;&amp;#039;&amp;#039; is a helper template used on W8MD.com to display documentation for templates from a separate documentation subpage, usually named &amp;lt;code&amp;gt;/doc&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This template helps keep active template code separate from instructions, examples, parameter descriptions, and categories. It is especially useful for frequently used W8MD templates such as infoboxes, citation templates, navigation templates, medical topic templates, and service-area templates.&lt;br /&gt;
&lt;br /&gt;
== Purpose ==&lt;br /&gt;
The purpose of this template is to:&lt;br /&gt;
&lt;br /&gt;
* Display template documentation in a clean documentation box.&lt;br /&gt;
* Keep template code separate from explanatory text.&lt;br /&gt;
* Allow examples and parameter notes to be edited without changing active template code.&lt;br /&gt;
* Encourage consistent W8MD template documentation.&lt;br /&gt;
* Place template categories on the documentation subpage instead of the main template page.&lt;br /&gt;
* Reduce the risk of accidental damage to working templates.&lt;br /&gt;
&lt;br /&gt;
== Basic usage ==&lt;br /&gt;
Place this at the bottom of a template page:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;amp;lt;noinclude&amp;amp;gt;&lt;br /&gt;
{{Documentation}}&lt;br /&gt;
&amp;amp;lt;/noinclude&amp;amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A typical W8MD template page should use this structure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;amp;lt;includeonly&amp;amp;gt;&lt;br /&gt;
Template code goes here.&lt;br /&gt;
&amp;amp;lt;/includeonly&amp;amp;gt;&amp;amp;lt;noinclude&amp;amp;gt;&lt;br /&gt;
{{Documentation}}&lt;br /&gt;
&amp;amp;lt;/noinclude&amp;amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The documentation should then be placed on the matching documentation subpage:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Template:Example/doc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Custom documentation page ==&lt;br /&gt;
By default, &amp;lt;code&amp;gt;{{Documentation}}&amp;lt;/code&amp;gt; displays documentation from the current template&amp;#039;s &amp;lt;code&amp;gt;/doc&amp;lt;/code&amp;gt; subpage.&lt;br /&gt;
&lt;br /&gt;
A custom documentation page can also be specified:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{Documentation|Template:Example/doc}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This may be useful when several related templates share the same documentation.&lt;br /&gt;
&lt;br /&gt;
== Recommended documentation page format ==&lt;br /&gt;
A good W8MD template documentation page should usually include:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{Short description|Brief description of what the template does}}&lt;br /&gt;
{{DISPLAYTITLE:Template:Example/doc}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Template:Example&amp;#039;&amp;#039;&amp;#039; is used to...&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&amp;amp;lt;pre&amp;amp;gt;&lt;br /&gt;
{{Example&lt;br /&gt;
| name =&lt;br /&gt;
| image =&lt;br /&gt;
| caption =&lt;br /&gt;
}}&lt;br /&gt;
&amp;amp;lt;/pre&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter&lt;br /&gt;
! Description&lt;br /&gt;
! Required?&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| Name displayed by the template&lt;br /&gt;
| Optional&lt;br /&gt;
|-&lt;br /&gt;
| image&lt;br /&gt;
| Image filename without File: prefix&lt;br /&gt;
| Optional&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&amp;amp;lt;pre&amp;amp;gt;&lt;br /&gt;
{{Example&lt;br /&gt;
| name = Sample page&lt;br /&gt;
| image = Example.jpg&lt;br /&gt;
| caption = Example image&lt;br /&gt;
}}&lt;br /&gt;
&amp;amp;lt;/pre&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Template:Infobox public health]]&lt;br /&gt;
* [[Template:Cite web]]&lt;br /&gt;
* [[Template:Cite journal]]&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;includeonly&amp;amp;gt;&lt;br /&gt;
[[Category:Template documentation]]&lt;br /&gt;
[[Category:W8MD templates]]&lt;br /&gt;
&amp;amp;lt;/includeonly&amp;amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter&lt;br /&gt;
! Description&lt;br /&gt;
! Required?&lt;br /&gt;
! Example&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;&lt;br /&gt;
| Optional custom documentation page to transclude instead of the default &amp;lt;code&amp;gt;/doc&amp;lt;/code&amp;gt; page&lt;br /&gt;
| No&lt;br /&gt;
| &amp;lt;code&amp;gt;Template:Infobox public health/doc&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
=== Standard example ===&lt;br /&gt;
Use on a template page:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;amp;lt;includeonly&amp;amp;gt;&lt;br /&gt;
{{#invoke:Infobox|infobox&lt;br /&gt;
| above = {{{name|{{PAGENAME}}}}}&lt;br /&gt;
| label1 = Field&lt;br /&gt;
| data1 = {{{field|}}}&lt;br /&gt;
}}&lt;br /&gt;
&amp;amp;lt;/includeonly&amp;amp;gt;&amp;amp;lt;noinclude&amp;amp;gt;&lt;br /&gt;
{{Documentation}}&lt;br /&gt;
&amp;amp;lt;/noinclude&amp;amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will display documentation from:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Template:Template name/doc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Custom documentation example ===&lt;br /&gt;
Use a custom documentation page:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;amp;lt;noinclude&amp;amp;gt;&lt;br /&gt;
{{Documentation|Template:Shared infobox documentation}}&lt;br /&gt;
&amp;amp;lt;/noinclude&amp;amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Where to place categories ==&lt;br /&gt;
Template categories should normally be placed on the &amp;lt;code&amp;gt;/doc&amp;lt;/code&amp;gt; page, not directly on the main template page.&lt;br /&gt;
&lt;br /&gt;
Use this format on the documentation subpage:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;amp;lt;includeonly&amp;amp;gt;&lt;br /&gt;
[[Category:W8MD templates]]&lt;br /&gt;
[[Category:Template documentation]]&lt;br /&gt;
&amp;amp;lt;/includeonly&amp;amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This prevents categories from being accidentally transcluded onto pages that use the template.&lt;br /&gt;
&lt;br /&gt;
== Where to place interwiki links ==&lt;br /&gt;
If interwiki links are used, they should usually be placed on the documentation subpage rather than inside the active template code.&lt;br /&gt;
&lt;br /&gt;
== W8MD best practices ==&lt;br /&gt;
For W8MD.com, documentation pages should be written clearly enough for editors, physicians, content writers, and technical maintainers to understand.&lt;br /&gt;
&lt;br /&gt;
Recommended W8MD documentation practices:&lt;br /&gt;
&lt;br /&gt;
* Begin with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{Short description|...}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Use &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{DISPLAYTITLE:...}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; when helpful.&lt;br /&gt;
* Clearly explain what the template does.&lt;br /&gt;
* Include a copy-and-paste usage example.&lt;br /&gt;
* Document each parameter in a table.&lt;br /&gt;
* Mark parameters as required or optional.&lt;br /&gt;
* Include at least one working example.&lt;br /&gt;
* Add related templates under &amp;lt;code&amp;gt;== See also ==&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Place categories inside &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;includeonly&amp;gt;...&amp;lt;/includeonly&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Avoid placing active template categories on the main template page.&lt;br /&gt;
* Avoid long prose inside the main template code.&lt;br /&gt;
* Keep examples medically accurate when documenting medical templates.&lt;br /&gt;
&lt;br /&gt;
== Suggested sections for W8MD template documentation ==&lt;br /&gt;
Most W8MD template documentation pages should use some or all of these sections:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
== Usage ==&lt;br /&gt;
== Parameters ==&lt;br /&gt;
== Examples ==&lt;br /&gt;
== TemplateData ==&lt;br /&gt;
== Tracking categories ==&lt;br /&gt;
== See also ==&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== TemplateData ==&lt;br /&gt;
If VisualEditor or TemplateWizard is enabled on W8MD.com, a &amp;lt;code&amp;gt;TemplateData&amp;lt;/code&amp;gt; block may be added to documentation pages.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;amp;lt;templatedata&amp;amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;description&amp;quot;: &amp;quot;Displays documentation for a template from its /doc subpage.&amp;quot;,&lt;br /&gt;
  &amp;quot;params&amp;quot;: {&lt;br /&gt;
    &amp;quot;1&amp;quot;: {&lt;br /&gt;
      &amp;quot;label&amp;quot;: &amp;quot;Documentation page&amp;quot;,&lt;br /&gt;
      &amp;quot;description&amp;quot;: &amp;quot;Optional custom documentation page to transclude.&amp;quot;,&lt;br /&gt;
      &amp;quot;type&amp;quot;: &amp;quot;wiki-page-name&amp;quot;,&lt;br /&gt;
      &amp;quot;required&amp;quot;: false&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;amp;lt;/templatedata&amp;amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Problem&lt;br /&gt;
! Possible cause&lt;br /&gt;
! Fix&lt;br /&gt;
|-&lt;br /&gt;
| Documentation does not appear&lt;br /&gt;
| The &amp;lt;code&amp;gt;/doc&amp;lt;/code&amp;gt; page does not exist&lt;br /&gt;
| Create the documentation subpage, such as &amp;lt;code&amp;gt;Template:Example/doc&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Categories appear on article pages&lt;br /&gt;
| Categories were placed directly inside the template&lt;br /&gt;
| Move categories to the &amp;lt;code&amp;gt;/doc&amp;lt;/code&amp;gt; page inside &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;includeonly&amp;gt;...&amp;lt;/includeonly&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Example code is being executed&lt;br /&gt;
| Code examples were not wrapped in &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;pre&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
| Wrap examples in &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;pre&amp;gt;...&amp;lt;/pre&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Template output looks broken&lt;br /&gt;
| Active template code may be mixed with documentation prose&lt;br /&gt;
| Keep active code inside &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;includeonly&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and documentation inside &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;noinclude&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Documentation page creates unwanted blank space&lt;br /&gt;
| Extra line breaks around includeonly/noinclude tags&lt;br /&gt;
| Place tags tightly around template code&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Related W8MD templates ==&lt;br /&gt;
* [[Template:Infobox public health]]&lt;br /&gt;
* [[Template:Infobox medical condition]]&lt;br /&gt;
* [[Template:Infobox medical intervention]]&lt;br /&gt;
* [[Template:Cite web]]&lt;br /&gt;
* [[Template:Cite journal]]&lt;br /&gt;
* [[Template:Short description]]&lt;br /&gt;
* [[Template:W8MD]]&lt;br /&gt;
* [[Template:GLP-1]]&lt;br /&gt;
&lt;br /&gt;
== Technical notes ==&lt;br /&gt;
This template assumes that W8MD.com has ParserFunctions enabled if the main &amp;lt;code&amp;gt;Template:Documentation&amp;lt;/code&amp;gt; uses &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#ifexist:}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The main template normally checks whether a documentation subpage exists. If it exists, the documentation is displayed. If it does not exist, the template displays a prompt to create one.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Help:Template]]&lt;br /&gt;
* [[Help:Transclusion]]&lt;br /&gt;
* [[Help:Infobox]]&lt;br /&gt;
* [[Help:Citation templates]]&lt;br /&gt;
* [[Template:Documentation]]&lt;br /&gt;
* [[Template:Infobox public health]]&lt;br /&gt;
* [[Template:Cite web]]&lt;br /&gt;
* [[Template:Cite journal]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;templatedata&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;description&amp;quot;: &amp;quot;Displays documentation for W8MD templates from a /doc subpage.&amp;quot;,&lt;br /&gt;
  &amp;quot;params&amp;quot;: {&lt;br /&gt;
    &amp;quot;1&amp;quot;: {&lt;br /&gt;
      &amp;quot;label&amp;quot;: &amp;quot;Documentation page&amp;quot;,&lt;br /&gt;
      &amp;quot;description&amp;quot;: &amp;quot;Optional custom documentation page to transclude instead of the default /doc page.&amp;quot;,&lt;br /&gt;
      &amp;quot;type&amp;quot;: &amp;quot;wiki-page-name&amp;quot;,&lt;br /&gt;
      &amp;quot;required&amp;quot;: false,&lt;br /&gt;
      &amp;quot;example&amp;quot;: &amp;quot;Template:Infobox public health/doc&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/templatedata&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;&lt;br /&gt;
[[Category:Template documentation]]&lt;br /&gt;
[[Category:Documentation templates]]&lt;br /&gt;
[[Category:W8MD templates]]&lt;br /&gt;
[[Category:WikiMD templates]]&lt;br /&gt;
[[Category:Help templates]]&lt;br /&gt;
&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Prab</name></author>
	</entry>
</feed>