Template:Documentation subpage
{{#if: |
|
![]() | This is a documentation subpage for Template:Documentation subpage (see that page for the template itself). It contains usage information, categories and other content that is not part of the original template page. |
{{#if:{
Warning: Default sort key "<span class="error">Warning: Default sort key "{{{defaultsort}}}" overrides earlier default sort key "Documentation subpage".[[Category:Pages with DEFAULTSORT conflicts|ΤDocumentation subpage]]</span>[[Category:Template documentation| ]] '"`UNIQ--nowiki-00000002-QINU`"''"`UNIQ--indicator-00000003-QINU`"'[[Category:Wikipedia template-protected templates|Documentation subpage]] '"`UNIQ--templatestyles-00000017-QINU`"''"`UNIQ--nowiki-00000004-QINU`"''"`UNIQ--indicator-00000005-QINU`"'[[Category:Wikipedia template-protected templates|Documentation subpage]]<div class="documentation-container" role="complementary" aria-labelledby="documentation-heading"> <div class="documentation"> <div class="documentation-startbox"> <span class="documentation-heading" id="documentation-heading">[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]] Template documentation</span><span class="mw-editsection-like plainlinks">[[[Template:Documentation subpage/doc|view]]] [[[Special:EditPage/Template:Documentation subpage/doc|edit]]] [[[Special:PageHistory/Template:Documentation subpage/doc|history]]] [[[Special:Purge/Template:Documentation subpage|purge]]]</span></div> <div class="shortdescription nomobile noexcerpt noprint searchaux" style="display:none">For use on the subpage itself</div> '"`UNIQ--templatestyles-00000006-QINU`"'<div class="module-shortcutanchordiv"><span id="doc_sub"></span></div><div class="module-shortcutboxplain noprint" role="note"><div class="module-shortcutlist">[[Wikipedia:Shortcut|Shortcut]]</div>'"`UNIQ--templatestyles-00000008-QINU`"'<div class="plainlist"><ul><li>{{<span class="plainlinks">[//en.wikipedia.org/w/index.php?title=Template:Doc_sub&redirect=no doc sub]</span><span style="display: none">[[Template:Doc sub]]</span>}}</li></ul></div></div> {{#if: | <table class="messagebox" style="line-height:1.1em;" style=" background:#f9f9b7;"> <tr> <td rowspan="3" style="width:60px;text-align:center;" > [[Image:Edit-paste.svg|40px]]</td> <td> This is the [[Wikipedia:Template documentation|template documentation]] page for [[Template:Documentation subpage]].</td></tr> <tr><td><small>This page may not be intended to be viewed directly. <br/ >Links using [[Help:Variable|variable]]s may appear broken; do not replace these with [[hardcoded]] page names or URLs.</small></td></tr> </table> |{{#ifeq: documentation subpage | doc | '"`UNIQ--templatestyles-0000000A-QINU`"'<table class="plainlinks ombox ombox-notice" role="presentation"><tr><td class="mbox-image">[[File:Edit-copy green.svg|40px]]</td><td class="mbox-text">'''This is a [[Wikipedia:Template documentation|documentation]] [[Wikipedia:Subpages|subpage]] for [[Template:Documentation subpage]]''' <small>(see that page for the template itself)</small>.<br />It contains usage information, [[Wikipedia:Categorization|categories]] and other content that is not part of the original template page.</td></tr></table> '"`UNIQ--templatestyles-0000000B-QINU`"'<div role="note" class="hatnote navigation-not-searchable">Not to be confused with [[:Template:Documentation]].</div> This template displays a message that the current page is a documentation subpage. =='"`UNIQ--h-0--QINU`"' Usage == : <code>{{[[Template:Documentation subpage|Documentation subpage]]}}</code> : or : <code>{{[[Template:Documentation subpage|Documentation subpage]]|[[<var style="padding-right: 1px;" >Page where the documentation is [[Help:Transclusion|transcluded]]</var>]]}}</code> ==='"`UNIQ--h-1--QINU`"'Userbox documentation=== To set this template to use "userbox" and "userbox page" rather than "template" and "template page" or "user template" and "user template page", use: : <code>{{[[Template:Userbox documentation subpage|Userbox documentation subpage]]}}</code> : or : <code>{{[[Template:Userbox documentation subpage|Userbox documentation subpage]]|[[<var style="padding-right: 1px;" >userbox page</var>]]}}</code> ==='"`UNIQ--h-2--QINU`"'Text customization=== The parameters <code class="tpl-para" style="word-break:break-word; ">|text1=</code> and <code class="tpl-para" style="word-break:break-word; ">|text2=</code> can be used to set the text of, respectively, the template's first and second lines. If ''text1'' is set but not ''text2'', both lines' text will derive from ''text1'': '"`UNIQ--templatestyles-0000000D-QINU`"'<div class="hidden-begin mw-collapsible mw-collapsible-leftside-toggle mw-collapsed " style=" "><div class="hidden-title skin-nightmode-reset-color" style=" ">With ''text1'' and ''text2''</div><div class="hidden-content mw-collapsible-content" style=" "> <code>'"`UNIQ--nowiki-0000000F-QINU`"'</code> {{#if: | <table class="messagebox" style="line-height:1.1em;" style=" background:#f9f9b7;"> <tr> <td rowspan="3" style="width:60px;text-align:center;" > [[Image:Edit-paste.svg|40px]]</td> <td> This is the [[Wikipedia:Template documentation|template documentation]] page for [[Template:[''page''] ]].</td></tr> <tr><td><small>This page may not be intended to be viewed directly. <br/ >Links using [[Help:Variable|variable]]s may appear broken; do not replace these with [[hardcoded]] page names or URLs.</small></td></tr> </table> |{{#ifeq: documentation subpage | documentation subpage | '"`UNIQ--templatestyles-00000010-QINU`"'<table class="plainlinks ombox ombox-notice" role="presentation"><tr><td class="mbox-image">[[File:Edit-copy green.svg|40px]]</td><td class="mbox-text">'''This is a [[Wikipedia:Template documentation|documentation]] [[Wikipedia:Subpages|subpage]] for [''page''] ''' <small>(see that page for the '''''text1 appears here''''' itself)</small>.<br />It contains usage information, [[Wikipedia:Categorization|categories]] and other content that is not part of the original '''''text2 appears here'''''.</td></tr></table> </div></div> '"`UNIQ--templatestyles-00000011-QINU`"'<div class="hidden-begin mw-collapsible mw-collapsible-leftside-toggle mw-collapsed " style=" "><div class="hidden-title skin-nightmode-reset-color" style=" ">With ''text2'' only</div><div class="hidden-content mw-collapsible-content" style=" "> <code>'"`UNIQ--nowiki-00000012-QINU`"'</code> {{#if: | <table class="messagebox" style="line-height:1.1em;" style=" background:#f9f9b7;"> <tr> <td rowspan="3" style="width:60px;text-align:center;" > [[Image:Edit-paste.svg|40px]]</td> <td> This is the [[Wikipedia:Template documentation|template documentation]] page for [[Template:[''page''] ]].</td></tr> <tr><td><small>This page may not be intended to be viewed directly. <br/ >Links using [[Help:Variable|variable]]s may appear broken; do not replace these with [[hardcoded]] page names or URLs.</small></td></tr> </table> |{{#ifeq: documentation subpage | documentation subpage | '"`UNIQ--templatestyles-00000013-QINU`"'<table class="plainlinks ombox ombox-notice" role="presentation"><tr><td class="mbox-image">[[File:Edit-copy green.svg|40px]]</td><td class="mbox-text">'''This is a [[Wikipedia:Template documentation|documentation]] [[Wikipedia:Subpages|subpage]] for [''page''] ''' <small>(see that page for the template itself)</small>.<br />It contains usage information, [[Wikipedia:Categorization|categories]] and other content that is not part of the original '''''text2 appears here'''''.</td></tr></table> </div></div> '"`UNIQ--templatestyles-00000014-QINU`"'<div class="hidden-begin mw-collapsible mw-collapsible-leftside-toggle mw-collapsed " style=" "><div class="hidden-title skin-nightmode-reset-color" style=" ">With ''text1'' only</div><div class="hidden-content mw-collapsible-content" style=" "> <code>'"`UNIQ--nowiki-00000015-QINU`"'</code> {{#if: | <table class="messagebox" style="line-height:1.1em;" style=" background:#f9f9b7;"> <tr> <td rowspan="3" style="width:60px;text-align:center;" > [[Image:Edit-paste.svg|40px]]</td> <td> This is the [[Wikipedia:Template documentation|template documentation]] page for [[Template:[''page''] ]].</td></tr> <tr><td><small>This page may not be intended to be viewed directly. <br/ >Links using [[Help:Variable|variable]]s may appear broken; do not replace these with [[hardcoded]] page names or URLs.</small></td></tr> </table> |{{#ifeq: documentation subpage | documentation subpage | '"`UNIQ--templatestyles-00000016-QINU`"'<table class="plainlinks ombox ombox-notice" role="presentation"><tr><td class="mbox-image">[[File:Edit-copy green.svg|40px]]</td><td class="mbox-text">'''This is a [[Wikipedia:Template documentation|documentation]] [[Wikipedia:Subpages|subpage]] for [''page''] ''' <small>(see that page for the '''''text1 appears here''''' itself)</small>.<br />It contains usage information, [[Wikipedia:Categorization|categories]] and other content that is not part of the original '''''text1 appears here'''''.</td></tr></table> </div></div> ==='"`UNIQ--h-3--QINU`"'Other parameters=== <code class="tpl-para" style="word-break:break-word; ">|inhibit=yes</code> will prevent this template from generating any categories. (By default, "''Namespace'' documentation pages" (usually [[:Category:Template documentation pages]]) is added, or [[:Category:Documentation subpages without corresponding pages]] if the main page doesn't exist.) =='"`UNIQ--h-4--QINU`"' Display == This template should normally be placed at the top of /doc pages. It changes output depending on where it is viewed: * On a /doc page, it displays a box explaining template documentation and links to the template page. ** As a workaround if the documentation page's name doesn't end with '/doc', use <code class="tpl-para" style="word-break:break-word; ">|override=</code> to specify the doc subpage's name. For example, if the documentation were at "Template:Example/Documentation", use <code class="tpl-para" style="word-break:break-word; ">|override=documentation</code> (must be lower-case to work) * On other pages – i.e. pages transcluding the /doc page – the template will not show. The template page itself (which contains <code><span class="nowrap">{{</span>[[Template:Documentation|Documentation]]<span class="nowrap">}}</span></code>) will automatically note that the documentation is [[Help:Transclusion|transcluded]] from a subpage. =='"`UNIQ--h-5--QINU`"' Module documentation == This template is automatically shown on /doc subpages in the [[Wikipedia:Namespace|module namespace]]. This is done automatically via [[MediaWiki:Scribunto-doc-page-header]]. This [[MediaWiki talk:Scribunto-doc-page-header#Category:Module documentation pages|fails to add the doc page]] to [[:Category:Module documentation pages]] so some module doc pages transclude the template manually or add the category directly to fix this. =='"`UNIQ--h-6--QINU`"' Automatic categorization == In addition to its message, the template adds pages to [[:Category:Template documentation pages]], [[:Category:User documentation pages]], or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the [[m:Help:Categories#Sort order|sort key]] to the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F". =='"`UNIQ--h-7--QINU`"' See also == *<span class="nowrap">{{</span>[[Template:Documentation/see also|Documentation/see also]]<span class="nowrap">}}</span> *<span class="nowrap">{{</span>[[Template:Documentation subpage|Documentation subpage]]<span class="nowrap">}}</span> *<span class="nowrap">{{</span>[[Template:Userspace disclaimers|Userspace disclaimers]]<span class="nowrap">}}</span> *<span class="nowrap">{{</span>[[Template:Userbox documentation subpage|Userbox documentation subpage]]<span class="nowrap">}}</span> [[Category:Documentation templates| ]] [[Category:Documentation header templates]] <div class="documentation-clear"></div> </div> <div role="note" class="documentation-metadata plainlinks">The above [[Wikipedia:Template documentation|documentation]] is [[Help:Transclusion|transcluded]] from [[Template:Documentation subpage/doc]]. <span class="documentation-toolbar">([[Special:EditPage/Template:Documentation subpage/doc|edit]] | [[Special:PageHistory/Template:Documentation subpage/doc|history]])</span><br />Editors can experiment in this template's [[Template:Documentation subpage/sandbox|sandbox]] <span class="documentation-toolbar">([[Special:EditPage/Template:Documentation subpage/sandbox|edit]] | [https://en.wikipedia.org/w/index.php?title=Special%3AComparePages&page1=Template%3ADocumentation+subpage&page2=Template%3ADocumentation+subpage%2Fsandbox diff])</span> and [[Template:Documentation subpage/testcases|testcases]] <span class="documentation-toolbar">([[Special:EditPage/Template:Documentation subpage/testcases|edit]])</span> pages.<br />Add categories to the [[Template:Documentation subpage/doc|/doc]] subpage. [[Special:PrefixIndex/Template:Documentation subpage/|Subpages of this template]].</div></div>" overrides earlier default sort key "<span class="error">Warning: Default sort key "{{{defaultsort}}}" overrides earlier default sort key "Documentation subpage".[[Category:Pages with DEFAULTSORT conflicts| ΤDocumentation subpage]]</span>[[Category:Template documentation]]".