Difference between revisions of "Template:Docs/row/required"

From The Coppermind
Jump to navigation Jump to search
(Created page with "<noinclude> Helper template to insert a required parameter row in an infobox template documentation page. {{docs|title=Documentation for a required row parameter}} </noinclud...")
 
m (+catkey)
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
<noinclude>
 
<noinclude>
Helper template to insert a required parameter row in an infobox template documentation page.
+
Helper template to insert a required parameter row in an infobox template documentation page. It takes 3 parameters:
  +
* <code>param</code>: The name of the parameter being documented
  +
* <code>desc</code>: A description of how the parameter is to be used
  +
* <code>eg</code>: One or more usage examples
   
  +
[[category: documentation templates|row]]
{{docs|title=Documentation for a required row parameter}}
 
  +
 
{{docs|title=Documentation for a required parameter}}
 
</noinclude>
 
</noinclude>
 
<!-- ROW STYLE -->
 
<!-- ROW STYLE -->
 
|- style="background:#FFDEAD;"
 
|- style="background:#FFDEAD;"
 
<!-- Parameter cell -->
 
<!-- Parameter cell -->
| style="text-align: center;" | <code>{{{param}}}</code>
+
| style="text-align: center;" | {{#if:{{{param|}}} | <code>{{{param}}}</code> | {{{'param|''Unknown parameter''}}} }}
 
<!-- Description cell -->
 
<!-- Description cell -->
 
| {{{desc}}}
 
| {{{desc}}}
 
<!-- Examples cell -->
 
<!-- Examples cell -->
| style="white-space: nowrap;" | {{{eg}}}
+
| style="white-space: nowrap;" |
  +
{{{eg}}}
 
<!-- END OF ROW -->
 
<!-- END OF ROW -->
 
|-
 
|-
Line 17: Line 23:
 
|}
 
|}
   
  +
== Templates with Required Parameters ==
== Usage ==
 
{{special: whatlinkshere/{{FULLPAGENAME}} }}
+
{{for|Special:WhatLinksHere/{{FULLPAGENAME}}|a full list of uses|here}}
  +
{{Special:WhatLinksHere/{{FULLPAGENAME}}|namespace=10}}

Latest revision as of 20:19, 19 April 2020

Helper template to insert a required parameter row in an infobox template documentation page. It takes 3 parameters:

  • param: The name of the parameter being documented
  • desc: A description of how the parameter is to be used
  • eg: One or more usage examples
Documentation for a required parameter
Parameter Description Examples
Unknown parameter {{{desc}}}

{{{eg}}}

Templates with Required Parameters[edit]