Difference between revisions of "Template:Documentation"

From Paradise Station Wiki
Jump to navigation Jump to search
(first creation, copied from Wikipedia:Template:Documentation)
 
 
(13 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}
<includeonly><div style="background-color:#ccdcff;border:2px solid #999999; padding:10px; margin:10px;" width="100%">
{|
|-
| <span style="font-weight:bold;font-size:200%; vertical-align:bottom; color:#555555;">[[File:TemplateIcon.png|float:left]] {{FULLPAGENAME}} - Documentation </span>
| <nowiki>[</nowiki>[{{fullurl:{{FULLPAGENAME}}|action=edit}} Edit]<nowiki>]</nowiki> <nowiki>[</nowiki>[{{fullurl:{{FULLPAGENAME}}|action=history}} History]<nowiki>]</nowiki>
|}
<hr>
__NOTOC__
==Implementation==
<div style="background-color:#f2f2f2;  padding:10px;" width="80%">{{{ImplementationCode}}}
</div>
{{#if: {{{Usage|}}} |
==Usage==
<div style="background-color:#f2f2f2;  padding:10px;" width="80%">{{{Usage}}}
</div>|}}
{{#if: {{{V1|}}} |
==Variables==
<div style="background-color:#f2f2f2;  padding:10px;" width="80%">
{{#if: {{{V1|}}} | <b>{{{V1}}}</b> = {{{VD1}}} <br> | }}{{#if: {{{V2|}}} | <b>{{{V2}}}</b> = {{{VD2}}} <br> | }}{{#if: {{{V3|}}} | <b>{{{V3}}}</b> = {{{VD3}}} <br> | }}{{#if:{{{V4|}}} | <b>{{{V4}}}</b> = {{{VD4}}} <br> | }}{{#if: {{{V5|}}} | <b>{{{V5}}}</b> = {{{VD5}}} <br> | }}{{#if: {{{V6|}}} | <b>{{{V6}}}</b> = {{{VD6}}} <br> | }}{{#if: {{{V7|}}} | <b>{{{V7}}}</b> = {{{VD7}}} <br> | }}{{#if: {{{V8|}}} | <b>{{{V8}}}</b> = {{{VD8}}} <br> | }}{{#if: {{{V9|}}} | <b>{{{V9}}}</b> = {{{VD9}}} <br> | }}{{#if:{{{V10|}}} | <b>{{{V10}}}</b> = {{{VD10}}} <br> | }}{{#if: {{{V11|}}} | <b>{{{V11}}}</b> = {{{VD11}}} <br> | }}{{#if: {{{V12|}}} | <b>{{{V12}}}</b> = {{{VD12}}} <br> | }}{{#if: {{{V13|}}} | <b>{{{V13}}}</b> = {{{VD13}}} <br> | }}{{#if: {{{V14|}}} | <b>{{{V14}}}</b> = {{{VD14}}} <br> | }}{{#if: {{{V15|}}} | <b>{{{V15}}}</b> = {{{VD15}}} <br> | }}
</div> |}}
{{#if: {{{Notes|}}} |
==Notes==
<div style="background-color:#f2f2f2;  padding:10px;" width="80%">
{{{Notes|}}}
</div> |}}
{{#if: {{{Warnings|}}}|
==Warnings==
<div style="background-color:#f2f2f2;  padding:10px;" width="80%">
{{{Warnings|}}}
</div>|}}
{{#if: {{{ExampleCode|}}}|
==Example==
<div style="background-color:#f2f2f2;  padding:10px;" width="80%">
{{{ExampleCode|}}}
</div><hr> <div style="background-color:#f2f2f2;  padding:10px;" width="80%">
{{{Example|No Example Available or Example is included below documentation for better formatting purposes}}}
</div>|}}
{{#if: {{{ExamplePage1|}}}|
===Example Pages===
<hr> <div style="background-color:#f2f2f2;  padding:10px;" width="80%">
{{#if: {{{ExamplePage1|}}} | [[{{{ExamplePage1|}}}]]<br> | }}
{{#if: {{{ExamplePage2|}}} | [[{{{ExamplePage2|}}}]]<br> | }}
{{#if: {{{ExamplePage3|}}} | [[{{{ExamplePage3|}}}]]<br> | }}
</div>|}}
 
</div>
 
<div style="background-color:#ccdcff;border:2px solid #999999; padding:10px; margin:10px;" width="100%">
<div style="background-color:#f2f2f2;  padding:10px;" width="80%">
To implement your own Documentation on another template page or to understand how to use the Documentation template, please see [[Template:Documentation]]
</div>
</div>
[[Category:Maintenance Templates]]</includeonly>
<noinclude> <!-- TEMPLATE ENDS HERE -->
{{Documentation
|ImplementationCode = <pre>
Documentation
| ImplementationCode= <pre>
| Usage=
| V1=    | VD1=
| V2=    | VD2=
| V3=    | VD3=
| V4=    | VD4=
| V5=    | VD5=
| V6=    | VD6=
| V7=    | VD7=
| V8=    | VD8= 
| V9=    | VD9=
| V10=  | VD10=
| V11=  | VD11=
| V12=  | VD12=
| Notes=
| Warnings=
| ExampleCode=<pre>
| Example=
| ExamplePage1=
| ExamplePage2=
| ExamplePage3=
</pre>
|Usage = Use this template to fully document your template.
|V1 = ImplementationCode | VD1= The exact code to implement this template without the parameters filled in. The Parameter you input for this variable should be surrounded by <nowiki><pre> and </pre></nowiki>. Don't use curly brackets to define the start and end of Implementation Code due to it breaking the documentation code.
|V2 = Usage | VD2= This is what describes where your template should be used, where it should be placed, and in what scenarios it should/should not be used.
|V3 = V1    | VD3= This is the name of your first variable
|V4 = VD1  | VD4= This is the description of value that should be put into the first variable and what it does
|V5 = V...  | VD5= Name of Variable #N
|V6 = VD... | VD6= Description of Variable #N
|V7 = V15  | VD7= Name of the 15th Variable(maximum number of vars this template supports)
|V8 = V15  | VD8= Description of the 15th Variable(maximum number of vars this template supports)
|V9 = Notes | VD9= General Notes about your template. Can explain tips and tricks, how the template works on different types of pages/protections, general formatting nuances of the template, etc. Can also explain if categories are automatically applied by your template and if your template uses any other templates.
|V10 = Warnings | VD10= General Warnings about using your template. Will your template break other templates code? Are there certain values you shouldn't apply to certain variables? Should your template be placed inside UI elements like Div, Tables, or Tabs? If something could break when using your template or you should not do something when using this template put it here.
|V11 = ExampleCode | VD11= This is the code that the example in the example section uses. It should be surrounded by <nowiki><pre></pre></nowiki> tags so that readers can see it.
|V12 = Example | VD12= This is the code for the example. It should fully use the template.
|Notes = This template should clearly explain and show how to use the template. Someone who has basic wiki knowledge should be able to look at the documentation and understand what every variable does and how to implement the template on their own wiki page. If an example won't fit well inside the documentation UI box then you should leave the example variable blank and instead place the code outside the documentation template below it.
|Warnings = This template should always be between <nowiki><noinclude> and <&#47; noinclude></nowiki> tags to avoid the documentation being transcluded onto a page it's not intended to be on. If this template is used on a protected page then you will not be able to utilize the Edit button at the top unless you have the correct User Rights. <br>
When using the closing <nowiki></pre></nowiki> you will need to replace the forward slash with <nowiki>&#47;</nowiki> so that the wiki wont recognize the forward slash and accidentally close the pre block too early. You must always start with the first variable or else the section will not show up; This applies to V1 and ExamplePage1.
|ExampleCode = View Source of this page
|Example = This page is the example.
|ExamplePage1 = Template:Documentation
}}
[[Category:Maintenance Templates]]
</noinclude>

Latest revision as of 03:52, 23 November 2023


float:left Template:Documentation - Documentation [Edit] [History]

Implementation

Documentation
| ImplementationCode= <pre>
| Usage=
| V1=    | VD1= 
| V2=    | VD2= 
| V3=    | VD3=
| V4=    | VD4= 
| V5=    | VD5=
| V6=    | VD6=
| V7=    | VD7= 
| V8=    | VD8=  
| V9=    | VD9=
| V10=   | VD10= 
| V11=   | VD11= 
| V12=   | VD12=
| Notes=
| Warnings=
| ExampleCode=<pre>
| Example=
| ExamplePage1=
| ExamplePage2=
| ExamplePage3=

Usage

Use this template to fully document your template.

Variables

ImplementationCode = The exact code to implement this template without the parameters filled in. The Parameter you input for this variable should be surrounded by <pre> and </pre>. Don't use curly brackets to define the start and end of Implementation Code due to it breaking the documentation code.
Usage = This is what describes where your template should be used, where it should be placed, and in what scenarios it should/should not be used.
V1 = This is the name of your first variable
VD1 = This is the description of value that should be put into the first variable and what it does
V... = Name of Variable #N
VD... = Description of Variable #N
V15 = Name of the 15th Variable(maximum number of vars this template supports)
V15 = Description of the 15th Variable(maximum number of vars this template supports)
Notes = General Notes about your template. Can explain tips and tricks, how the template works on different types of pages/protections, general formatting nuances of the template, etc. Can also explain if categories are automatically applied by your template and if your template uses any other templates.
Warnings = General Warnings about using your template. Will your template break other templates code? Are there certain values you shouldn't apply to certain variables? Should your template be placed inside UI elements like Div, Tables, or Tabs? If something could break when using your template or you should not do something when using this template put it here.
ExampleCode = This is the code that the example in the example section uses. It should be surrounded by <pre></pre> tags so that readers can see it.
Example = This is the code for the example. It should fully use the template.

Notes

This template should clearly explain and show how to use the template. Someone who has basic wiki knowledge should be able to look at the documentation and understand what every variable does and how to implement the template on their own wiki page. If an example won't fit well inside the documentation UI box then you should leave the example variable blank and instead place the code outside the documentation template below it.

Warnings

This template should always be between <noinclude> and </ noinclude> tags to avoid the documentation being transcluded onto a page it's not intended to be on. If this template is used on a protected page then you will not be able to utilize the Edit button at the top unless you have the correct User Rights.
When using the closing </pre> you will need to replace the forward slash with / so that the wiki wont recognize the forward slash and accidentally close the pre block too early. You must always start with the first variable or else the section will not show up; This applies to V1 and ExamplePage1.

Example

View Source of this page


This page is the example.

Example Pages


To implement your own Documentation on another template page or to understand how to use the Documentation template, please see Template:Documentation