Template:Documentation subpage/doc: Difference between revisions

fix code
(Create)
 
(fix code)
Line 1: Line 1:
{{documentation subpage}}<br>__NOTOC__<br>==Usage==<br>{{tl|documentation subpage}}<br>'''OR'''<br>{{tlx|documentation subpage|&lt;nowiki&gt;[[&lt;/nowiki&gt;&lt;var&gt;main page to link to&lt;/var&gt;&lt;nowiki&gt;]]&lt;/nowiki&gt;}}
{{documentation subpage}}
__NOTOC__
==Usage==
{{tl|documentation subpage}}
'''OR'''
{{tlx|documentation subpage|<nowiki>[[</nowiki><var>main page to link to</var><nowiki>]]</nowiki>}}


===Userboxes===<br>When used to document usage of a [[Wikipedia:Userboxes|userbox]], it may be preferred to have this template state "userbox"/"userbox page" instead of "{{lc:{{ns:Template}}}}"/"{{lc:{{ns:Template}}}} page" or "{{lc:{{ns:User}}}} template"/"{{lc:{{ns:User}}}} template page". If this is preferred, use:<br>{{tl|userbox documentation subpage}}<br>'''OR'''<br>{{tlx|userbox documentation subpage|&lt;nowiki&gt;[[&lt;/nowiki&gt;&lt;var&gt;main userbox page to link to&lt;/var&gt;&lt;nowiki&gt;]]&lt;/nowiki&gt;}}
===Userboxes===
When used to document usage of a [[Wikipedia:Userboxes|userbox]], it may be preferred to have this template state "userbox"/"userbox page" instead of "{{lc:{{ns:Template}}}}"/"{{lc:{{ns:Template}}}} page" or "{{lc:{{ns:User}}}} template"/"{{lc:{{ns:User}}}} template page". If this is preferred, use:
{{tl|userbox documentation subpage}}
'''OR'''
{{tlx|userbox documentation subpage|<nowiki>[[</nowiki><var>main userbox page to link to</var><nowiki>]]</nowiki>}}


===Customization of text===<br>To manually change the text of the template, the "&lt;code&gt;text1=&lt;var&gt;your text here&lt;/var&gt;&lt;/code&gt;" and/or "&lt;code&gt;text2=&lt;var&gt;your other text here&lt;/var&gt;&lt;/code&gt;" parameters can be specified. "&lt;code&gt;text1=&lt;/code&gt;" changes the automatic text on the first line to your own word(s). "&lt;code&gt;text2=&lt;/code&gt;" changes the automatic text on the second line to your own word(s). If "&lt;code&gt;text1=&lt;/code&gt;" parameter is specified without the "&lt;code&gt;text2=&lt;/code&gt;" parameter, both the first and second line of text will be custom based on the text given in the "&lt;code&gt;text1=&lt;/code&gt;" parameter.
===Customization of text===
To manually change the text of the template, the "<code>text1=<var>your text here</var></code>" and/or "<code>text2=<var>your other text here</var></code>" parameters can be specified. "<code>text1=</code>" changes the automatic text on the first line to your own word(s). "<code>text2=</code>" changes the automatic text on the second line to your own word(s). If "<code>text1=</code>" parameter is specified without the "<code>text2=</code>" parameter, both the first and second line of text will be custom based on the text given in the "<code>text1=</code>" parameter.


Example usage:<br>{{tlx|documentation subpage|text1&lt;nowiki&gt;=&lt;/nowiki&gt;&lt;var&gt;custom first and second line text&lt;/var&gt;}}
Example usage:
{{tlx|documentation subpage|text1<nowiki>=</nowiki><var>custom first and second line text</var>}}


{{tlx|documentation subpage|text2&lt;nowiki&gt;=&lt;/nowiki&gt;&lt;var&gt;custom second line text only&lt;/var&gt;}}
{{tlx|documentation subpage|text2<nowiki>=</nowiki><var>custom second line text only</var>}}


{{tlx|documentation subpage|text1&lt;nowiki&gt;=&lt;/nowiki&gt;&lt;var&gt;custom first line text&lt;/var&gt;|text2&lt;nowiki&gt;=&lt;/nowiki&gt;&lt;var&gt;custom second line text&lt;/var&gt;}}
{{tlx|documentation subpage|text1<nowiki>=</nowiki><var>custom first line text</var>|text2<nowiki>=</nowiki><var>custom second line text</var>}}


==How it is displayed==<br>This template should be placed at the top of "/doc" pages. It changes output depending on where it is viewed:<br>* On a "/doc" page, it displays a box explaining template documentation and links to the template page.<br>* On other pages (ie, pages transcluding the "/doc" page), the template will not show. The template page itself (which contains &lt;code&gt;{{tl|Documentation}}&lt;/code&gt;) will automatically note that the documentation is [[Wikipedia:Transclusion|transcluded]] from a subpage.
==How it is displayed==
This template should 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.
* On other pages (ie, pages transcluding the "/doc" page), the template will not show. The template page itself (which contains <code>{{tl|Documentation}}</code>) will automatically note that the documentation is [[Wikipedia:Transclusion|transcluded]] from a subpage.


==Functions==<br>In addition to the output message, the template categorizes pages to [[:Category:Template documentation]], [[:Category:User documentation]], 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 (ie, "Foo" on "Template:Foo", so it would be sorted in categories under 'F').
==Functions==
In addition to the output message, the template categorizes pages to [[:Category:Template documentation]], [[:Category:User documentation]], 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 (ie, "Foo" on "Template:Foo", so it would be sorted in categories under 'F').


==See also==<br>* [[Wikipedia:Template documentation]] for how this template is used.<br>{{ Documentation/doc/see also }}<br>&lt;includeonly&gt;<br>&lt;!-- categories and interwiki links --&gt;<br>[[Category:Template documentation| {{PAGENAME}}]]<br>[[Category:Template namespace templates]]
==See also==
* [[Wikipedia:Template documentation]] for how this template is used.
<includeonly>
<!-- categories and interwiki links -->
[[Category:Template documentation| {{PAGENAME}}]]
[[Category:Template namespace templates]]


[[ar:قالب:صفحة توثيق فرعية]]<br>[[bg:Шаблон:Подстраница с документация]]<br>[[fa:الگو:Documentation subpage]]<br>[[es:Plantilla:Subpágina documentación de plantilla]]<br>[[id:Templat:Subhalaman dokumentasi]]<br>[[is:Snið:Skjalsíða]]<br>[[ja:template:Documentation subpage]]<br>[[mk:Шаблон:Документација потстрана]]<br>[[no:mal:Documentation subpage]]<br>[[pl:Szablon:Podstrona dokumentacji]]<br>[[sl:template:Dokumentacijska podstran]]<br>[[sq:Stampa:Documentation subpage]]<br>[[uk:Шаблон:Підсторінка документації]]
</includeonly>
 
&lt;/includeonly&gt;<br>
90,866

edits