Template:Documentation subpage/doc: Difference between revisions

From FamilySearch Wiki
(Create)
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{documentation subpage}}
{{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;}}
__NOTOC__
==Usage==
{{tl|documentation subpage}}
'''OR'''
{{tlx|documentation subpage|<nowiki>[[</nowiki><var>main page to link to</var><nowiki>]]</nowiki>}}


===Customization of text===
===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;}}
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:
===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.
{{tlx|documentation subpage|text1<nowiki>=</nowiki><var>custom first and second line text</var>}}


{{tlx|documentation subpage|text2<nowiki>=</nowiki><var>custom second line text only</var>}}
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;}}


{{tlx|documentation subpage|text1<nowiki>=</nowiki><var>custom first line text</var>|text2<nowiki>=</nowiki><var>custom 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;}}


==How it is displayed==
{{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;}}
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==
==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.
In addition to the output message, the template categorizes pages to [[:Category:Template documentation]] or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the [[Categorization#Using_sort_keys|sort key]] to the page name without namespace (ie, "Foo" on "Template:Foo", so it would be sorted in categories under 'F').


==See also==
==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').
* [[Wikipedia:Template documentation]] for how this template is used.
<includeonly>
<!-- categories and interwiki links -->


</includeonly>
==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]]
 
[[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:Шаблон:Підсторінка документації]]
 
&lt;/includeonly&gt;<br>

Revision as of 11:05, 12 March 2009



==Usage==
{{documentation subpage}}
OR
{{documentation subpage{{{3}}}{{{4}}}{{{5}}}{{{6}}}{{{7}}}{{{8}}}{{{9}}}{{{10}}}{{{11}}}...}}

===Userboxes===
When used to document usage of a userbox, it may be preferred to have this template state "userbox"/"userbox page" instead of "template"/"template page" or "user template"/"user template page". If this is preferred, use:
{{userbox documentation subpage}}
OR
{{userbox documentation subpage{{{3}}}{{{4}}}{{{5}}}{{{6}}}{{{7}}}{{{8}}}{{{9}}}{{{10}}}{{{11}}}...}}

===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:
{{documentation subpage{{{2}}}{{{3}}}{{{4}}}{{{5}}}{{{6}}}{{{7}}}{{{8}}}{{{9}}}{{{10}}}{{{11}}}...}}

{{documentation subpage{{{2}}}{{{3}}}{{{4}}}{{{5}}}{{{6}}}{{{7}}}{{{8}}}{{{9}}}{{{10}}}{{{11}}}...}}

{{documentation subpage{{{2}}}{{{3}}}{{{4}}}{{{5}}}{{{6}}}{{{7}}}{{{8}}}{{{9}}}{{{10}}}{{{11}}}...}}

==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>{{Documentation}}</code>) will automatically note that the documentation is transcluded from a subpage.

==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 sort key to the page name without namespace (ie, "Foo" on "Template:Foo", so it would be sorted in categories under 'F').

==See also==
* Wikipedia:Template documentation for how this template is used.
Template:Documentation/doc/see also
<includeonly>
<!-- categories and interwiki links -->

ar:قالب:صفحة توثيق فرعية
bg:Шаблон:Подстраница с документация
fa:الگو:Documentation subpage

id:Templat:Subhalaman dokumentasi
is:Snið:Skjalsíða

mk:Шаблон:Документација потстрана
no:mal:Documentation subpage
pl:Szablon:Podstrona dokumentacji
sl:template:Dokumentacijska podstran
sq:Stampa:Documentation subpage
uk:Шаблон:Підсторінка документації

</includeonly>