Difference between revisions of "Template:Doc"

From Magickapedia
Jump to: navigation, search
dlen>Game widow
 
(update)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
<noinclude>{{doc/start}}
 
<noinclude>{{doc/start}}
To use, create a sub-page from the template called '''doc''', put {{tl|doc/start}} at the start of your documentation, and {{tl|doc/end}} at the end.
+
To use, create a sub-page from the template called '''doc''', put {{tlx|doc/start}} at the start of your documentation, and {{tlx|doc/end}} at the end.
   
Go back to your main template page and put &lt;noinclude&gt;{{tl|doc}}&lt;/noinclude&gt; on a newline after the end of the template. /doc pages will automatically be added to [[:Category:Template documentation]].
+
Go back to your main template page and put &lt;noinclude&gt;{{tlx|doc}}&lt;/noinclude&gt; on a newline after the end of the template. /doc pages will automatically be added to [[:Category:Documentation templates]].
   
 
== Optional parameters ==
 
== Optional parameters ==
 
=== clear ===
 
=== clear ===
If your main template page has floating content and you would like to stop it going over the documentation, put {{tlx|doc/start|clear}} instead of {{tl|doc/start}} on your documentation page.<br/>
+
If your main template page has floating content and you would like to stop it going over the documentation, put {{tlx|doc/start|clear}} instead of {{tlx|doc/start}} on your documentation page.<br>
 
This is also useful for templates not using &lt;includeonly&gt;, as it will put some space between the template and the documentation box.
 
This is also useful for templates not using &lt;includeonly&gt;, as it will put some space between the template and the documentation box.
   
 
=== nodoc=1 ===
 
=== nodoc=1 ===
If a template has no documentation and you don't know how to use it, put {{tlx|doc/start|nodoc{{=}}1}} (or if the template needs clear as well, {{tlx|doc/start|clear|nodoc{{=}}1}}) instead of {{tl|doc/start}} on your documentation page.<br/>
+
If a template has no documentation and you don't know how to use it, put {{tlx|doc/start|nodoc{{=}}1}} (or if the template needs clear as well, {{tlx|doc/start|clear|nodoc{{=}}1}}) instead of {{tlx|doc/start}} on your documentation page.<br>
 
The documentation's background will become red to make it more noticeable, and the page will be added to [[:Category:Templates with no documentation]].
 
The documentation's background will become red to make it more noticeable, and the page will be added to [[:Category:Templates with no documentation]].
   
 
=== baddoc=1 ===
 
=== baddoc=1 ===
Similar to nodoc, this is used to mark templates that '''do''' have documentation, but it isn't very good. This can mean it doesn't have enough examples, doesn't explain all the functions properly, or doesn't explain the point of the template properly.<br/>
+
Similar to nodoc, this is used to mark templates that '''do''' have documentation, but it isn't very good. This can mean it doesn't have enough examples, doesn't explain all the functions properly, or doesn't explain the point of the template properly.<br>
 
The documentation's background will become yellow to make it more noticeable, and the page will be added to [[:Category:Templates with bad documentation]].
 
The documentation's background will become yellow to make it more noticeable, and the page will be added to [[:Category:Templates with bad documentation]].
   
Line 20: Line 20:
 
</div>
 
</div>
   
[[Category:Documentation templates]]
+
[[Category:Documentation templates| ]]
 
</noinclude><includeonly>{{/doc}}</includeonly>
 
</noinclude><includeonly>{{/doc}}</includeonly>

Latest revision as of 22:05, 30 July 2020

Template-info.png Documentation

To use, create a sub-page from the template called doc, put {{doc/start}} at the start of your documentation, and {{doc/end}} at the end.

Go back to your main template page and put <noinclude>{{doc}}</noinclude> on a newline after the end of the template. /doc pages will automatically be added to Category:Documentation templates.

Optional parameters

clear

If your main template page has floating content and you would like to stop it going over the documentation, put {{doc/start|clear}} instead of {{doc/start}} on your documentation page.
This is also useful for templates not using <includeonly>, as it will put some space between the template and the documentation box.

nodoc=1

If a template has no documentation and you don't know how to use it, put {{doc/start|nodoc=1}} (or if the template needs clear as well, {{doc/start|clear|nodoc=1}}) instead of {{doc/start}} on your documentation page.
The documentation's background will become red to make it more noticeable, and the page will be added to Category:Templates with no documentation.

baddoc=1

Similar to nodoc, this is used to mark templates that do have documentation, but it isn't very good. This can mean it doesn't have enough examples, doesn't explain all the functions properly, or doesn't explain the point of the template properly.
The documentation's background will become yellow to make it more noticeable, and the page will be added to Category:Templates with bad documentation.

If both nodoc and baddoc are specified, baddoc will be ignored.