Template:Documentation: Difference between revisions
Jump to navigation
Jump to search
FaeriMagic (talk | contribs) (Created page with "<includeonly>{{#ifexist:{{FULLPAGENAME}}/doc|{{{{FULLPAGENAME}}/doc}}}}</includeonly> <noinclude> {{Documentation}} Category:Documentation templates </noinclude>") |
FaeriMagic (talk | contribs) mNo edit summary |
||
Line 1: | Line 1: | ||
<includeonly>{{#ifexist:{{FULLPAGENAME}}/doc|{{{{FULLPAGENAME}}/doc}}}}</includeonly> | <includeonly>{{#ifexist:{{FULLPAGENAME}}/doc|{{{{FULLPAGENAME}}/doc}}}}</includeonly><noinclude> | ||
<noinclude> | |||
{{Documentation}} | {{Documentation}} | ||
== Example == | |||
Below is a working example using a subpage at [[:Template:Documentation/doc]]: | |||
<blockquote> | |||
{{Documentation/doc}}</blockquote> | |||
[[Category:Documentation templates]] | [[Category:Documentation templates]] | ||
</noinclude> | </noinclude> |
Revision as of 05:54, 30 July 2025
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 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.