Difference between revisions of "Template:Docs"

From The Coppermind
Jump to navigation Jump to search
m (+)
m (make into a "topper")
Line 1: Line 1:
 
<noinclude>
{| class="wikitable" width=100%
 
  +
  +
This template includes the "top" of the table for any template documents. Calls to this table should be followed by rows which document each of the templates parameters and finally the table should be "closed" by inserting <code><nowiki>|}</nowiki></code> after the final row.
  +
 
</noinclude>{| class="wikitable" width=100%
   
 
<!-- TABLE CAPTION -->
 
<!-- TABLE CAPTION -->
Line 11: Line 15:
 
|-
 
|-
   
  +
<noinclude>
{{{1}}}
 
   
 
|-
 
|-
  +
| <code>title</code>
  +
| the text to put into the document table caption
  +
| this page, for example: <code><nowiki>|title=Template Parameter Documentation Table</nowiki></code>
  +
|-
  +
 
|}
 
|}
  +
<noinclude>
 
  +
A full example:
{{Special:PrefixIndex/Template:Docs/}}
 
  +
  +
{| width=100% border=1
  +
| width=50% |
  +
<pre class="code">
  +
{{docs|title=demonstration template}}
  +
  +
<!-- test parameter -->
  +
|-
  +
| <code>test</code>
  +
| a testing parameter
  +
| <code><nowiki>|test=testing things</nowiki></code>
  +
|-
  +
  +
<!-- image parameter -->
  +
{{docs/image|File: Test Image.svg}}
  +
  +
|}
  +
</pre>
  +
| width=50% |.
  +
|}
  +
  +
== Common Parameter Rows ==
 
{{Special:PrefixIndex/{{FULLPAGENAME}}/}}

Revision as of 17:53, 18 April 2019


This template includes the "top" of the table for any template documents. Calls to this table should be followed by rows which document each of the templates parameters and finally the table should be "closed" by inserting |} after the final row.

Template Parameter Documentation Table
Parameter Description Examples
title the text to put into the document table caption this page, for example: |title=Template Parameter Documentation Table
A full example:
{{docs|title=demonstration template}}

<!-- test parameter -->
|-
| <code>test</code>
| a testing parameter
| <code>|test=testing things</code>
|-

<!-- image parameter -->
{{docs/image|File: Test Image.svg}}

|}
.

Common Parameter Rows