Difference between revisions of "Template:Documentation"

From Nookipedia, the Animal Crossing wiki
(Added div box with background color.)
(Added bar to separate Template documentation from the actual documentation; changed colors a bit)
Line 1: Line 1:
 
<includeonly>{{#ifexist: {{FULLPAGENAME}}/doc  
 
<includeonly>{{#ifexist: {{FULLPAGENAME}}/doc  
|<div class="boilerplate" style="background-color: #FFFFE0; padding: 0px 10px 0px 10px; border: 1px solid #BDB76B;">
+
|<div class="boilerplate" style="background-color: #F5F5F5; padding: 10px 10px 10px 10px; border: 1px solid #C0C0C0;">
 
<span style="font-size:large; font-weight:bold; text-align:center">Template documentation</span> ([[{{FULLPAGENAME}}/doc|view]])
 
<span style="font-size:large; font-weight:bold; text-align:center">Template documentation</span> ([[{{FULLPAGENAME}}/doc|view]])
 +
----
 
{{:{{FULLPAGENAME}}/doc}}</div>
 
{{:{{FULLPAGENAME}}/doc}}</div>
 
| No documentation for {{FULLPAGENAME}} exists.}}
 
| No documentation for {{FULLPAGENAME}} exists.}}

Revision as of 09:03, April 9, 2019


Template documentation (view)


Usage

{{Documentation|<page title>}}

This template exists to include documentation of a particular template using the doc subpage. Adding {{Documentation}} in, for example, Template:Notice Box effectively transcludes Template:Notice Box/doc.

By default the template will automatically link to a subpage of the page its placed on. The one and only parameter allows you to name a different page instead. This is useful if you want related templates to share the same documentation, as you can link them all to the same subpage.