Template:Documentation/doc: Difference between revisions
Jump to navigation
Jump to search
FaeriMagic (talk | contribs) (Created page with "This template transcludes documentation from a <code>/doc</code> subpage onto the template page, if it exists. == Basic usage == Place the following at the bottom of the template: <pre><nowiki><noinclude> {{Documentation}} </noinclude></nowiki></pre> This setup ensures that: * When viewing the template page, the documentation is displayed. * When the template is used elsewhere, the documentation is hidden. <noinclude>== Example == Below is a working example using a sub...") |
FaeriMagic (talk | contribs) mNo edit summary |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{Documentation subpage}} <!-- Adds [[Category:Documentation subpage]] --> | |||
This template transcludes documentation from a <code>/doc</code> subpage onto the template page, if it exists. | This template transcludes documentation from a <code>/doc</code> subpage onto the template page, if it exists. | ||
Line 8: | Line 9: | ||
This setup ensures that: | This setup ensures that: | ||
* When viewing the template page, the documentation is displayed. | * When viewing the template page, the documentation is displayed. | ||
* When the template is used elsewhere, the documentation is hidden. | * When the template is used elsewhere, the documentation is hidden.<noinclude> | ||
== Example == | |||
Below is a working example using a subpage at [[:Template:Documentation/doc]]: | Below is a working example using a subpage at [[:Template:Documentation/doc]]: | ||
<blockquote> | |||
{{Documentation/doc}} | {{Documentation/doc}} | ||
</blockquote> | |||
</noinclude> |
Latest revision as of 16:00, 30 July 2025
This is the /doc
subpage of Template:Documentation. Any changes made here will reflect on the main template page.
This template transcludes documentation from a /doc
subpage onto the template page, if it exists.
Basic usage
Place the following at the bottom of the template:
<noinclude> {{Documentation}} </noinclude>
This setup ensures that:
- When viewing the template page, the documentation is displayed.
- When the template is used elsewhere, the documentation is hidden.
Example
Below is a working example using a subpage at Template:Documentation/doc:
This is the
/doc
subpage of Template:Documentation. Any changes made here will reflect on the main template page.This template transcludes documentation from a
/doc
subpage onto the template page, if it exists.Basic usage
Place the following at the bottom of the template:
<noinclude> {{Documentation}} </noinclude>This setup ensures that:
- When viewing the template page, the documentation is displayed.
- When the template is used elsewhere, the documentation is hidden.