求真百科歡迎當事人提供第一手真實資料,洗刷冤屈,終結網路霸凌。

變更

前往: 導覽搜尋

Template:Documentation subpage/doc

增加 1,441 位元組, 6 年前
Undid revision 745151518 by 2.26.152.82 (talk)
{{documentation Documentation subpage}}{{high-use|60,000+}} __NOTOC__==Usage== <nowiki>: {{documentation tlx|Documentation subpage}}</nowiki>'''OR''': or <nowiki>: {{tlx|Documentation subpage |&#91;&#91;{{var|Page where the documentation subpage[[Wikipedia:Transclusion|main page to link totranscluded]]}}&#93;&#93;}}</nowiki>
===Customization of textUserbox documentation===To manually change the text of the set this template, the to use "<code>text1=<var>your text here</var></code>userbox" and/or "<code>text2=<var>your other text here</var></code>userbox page" parameters can be specified. rather than "<code>text1=</code>{{lc:{{ns:Template}}}}" changes the automatic text on the first line to your own word(s). and "<code>text2=</code>{{lc:{{ns:Template}}}} page" changes the automatic text on the second line to your own word(s). If or "<code>text1=</code>{{lc:{{ns:User}}}} template" parameter is specified without the and "<code>text2=</code>{{lc:{{ns:User}}}} template page" parameter, both the first and second line of text will be custom based on the text given in the "<code>text1=</code>" parameter.use:: {{tlx|Userbox documentation subpage}}: or: {{tlx|Userbox documentation subpage |&#91;&#91;{{var|userbox page}}&#93;&#93;}}
Example usage===Text customization===The parameters {{para|text1}} and/or {{para|text2}} 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'':{{Hidden begin |showhide=left |title=With ''text1'' and ''text2''}}<code><nowiki>{{Documentation subpage |text1='''''text1 appears here''''' |text2='''''text2 appears here'''''}}</nowiki></code>{{Documentation subpage |[''page''] |text1='''''text1 appears here''''' |text2='''''text2 appears here''''' |override={{lc:{{SUBPAGENAME}}<!-- Hack to allow example to appear, even when viewed from [[Template:Documentation subpage]] -->}}}}{{Hidden end}}{{Hidden begin |showhide=left |title=With ''text2'' only}}<code><nowiki>{{Documentation subpage |text2='''''text2 appears here'''''}}</nowiki></code>{{Documentation subpage |[''page''] |text2='''''text2 appears here''''' |override={{lc:{{SUBPAGENAME}}<!-- Hack to allow example to appear, even when viewed from [[Template:Documentation subpage]] -->}}}}{{Hidden end}} {{Hidden begin |showhide=left |title=With ''text1'' only}}<code><nowiki>{{documentation Documentation subpage|text1= custom first and second line text'''''text1 appears here'''''}}</nowiki></code>{{Documentation subpage |[''page''] |text1='''''text1 appears here''''' |override={{lc:{{SUBPAGENAME}}<!-- Hack to allow example to appear, even when viewed from [[Template:Documentation subpage]] -->}}}}{{Hidden end}}
<nowiki>===Other parameters==={{documentation subpagepara|inhibit|text2=custom second line text onlyyes}}</nowiki>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.)
== 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.* On other pages&nbsp;– i.e. pages transcluding the /doc page&nbsp;– the template will not show. The template page itself (which contains <nowikicode>{{documentation subpage|text1=custom first line texttl|text2=custom second line textDocumentation}}</nowikicode>) will automatically note that the documentation is [[Wikipedia:Transclusion|transcluded]] from a subpage.
==How it is displayedFunctions ==This In addition to its message, the template should be placed at the top of "/doc" adds pages. It changes output depending on where it is viewedto [[:Category:* On a "/doc" pageTemplate documentation pages]], it displays a box explaining template [[:Category:User documentation and links to the template page.* On other pages ]], or similar (ie, pages transcluding named after the "/doc" pagesubject space), but only for documentation pages in namespaces with the template will not showsubpage feature. The template page itself (which contains <code>{{tl|Documentation}}</code>) will automatically note that It defaults the documentation is [[wm:WikipediaHelp:TransclusionCategories#Sort order|transcludedsort key]] from a subpageto the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F".
<!--this section is not used (at least, not yet)==FunctionsSee also ==In addition to the output message, the template categorizes pages to [[:Category:Template documentation]], [[:Category:{{Documentation/see also}}{{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').Talk Pages}}-->{{Userspace Disclaimers}}
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox || <!-- categories and interwiki links Categories below here, please; interwikis to Wikidata.-->[[Category:template Template documentation| ]][[Category:Template namespace templates]]}}</includeonly>
匿名用戶