Шаблон:Help/Categories — различия между версиями

Материал из Базы Знаний
Перейти к: навигация, поиск
(Новая страница: «<noinclude> {{#ifexist: Template:PD Help Page/{{SUBPAGENAME}}|{{PD Help Page/{{SUBPAGENAME}} }}|{{PD Help Page}} }} This template is to be transcluded in '''public ...»)
 
 
Строка 2: Строка 2:
 
{{#ifexist: Template:PD Help Page/{{SUBPAGENAME}}|{{PD Help Page/{{SUBPAGENAME}} }}|{{PD Help Page}} }}
 
{{#ifexist: Template:PD Help Page/{{SUBPAGENAME}}|{{PD Help Page/{{SUBPAGENAME}} }}|{{PD Help Page}} }}
  
This template is to be transcluded in '''public domain''' help pages to categorize those pages.
+
This template is to be transcluded in '''public domain''' help pages.
  
 +
This template will transclude the central en categories template, if the template exists.
 +
Include this template in any language subpages, to unify the page's categories across languages.
 
== Example ==
 
== Example ==
 +
* title: Help:Deleting a page --> transclude {<nowiki></nowiki>{Help:Deleting a page/categories}}
 +
* title: Help:Deleting a page/th --> transclude {<nowiki></nowiki>{Help:Deleting a page/categories}}
 +
* title: Help:Deleting a page/subpage --> transclude {<nowiki></nowiki>{Help:Deleting a page/subpage/categories}}
 +
* title: Help:Deleting a page/subpage/th --> transclude {<nowiki></nowiki>{Help:Deleting a page/subpage/categories}}
  
<nowiki>{{</nowiki>{{PAGENAME}}|MediaWiki Introduction|lang=zh}}
+
[[Category:Internationalization templates|Categories/Help]]
 +
</noinclude><!--
  
<nowiki>{{</nowiki>{{PAGENAME}}|MediaWiki Introduction}}
+
Trying to optimize {{If en}} calling.
 +
This call {{If en}} only once.
  
Default value of {{{lang}}} will be <nowiki>{{SUBPAGENAME}}</nowiki> (which will be "fr", "ja", "th", for, "Page/fr", "Page/ja", "Page/th", respectively).
+
-->{{If en|<!--
  
If you want to specify the sort key, you may instead use the form <nowiki>[[Category:Cat name{{Lang subpage}}|sort key]]</nowiki>.
+
  -->{{#ifexist: {{{1|{{NAMESPACE}}:{{PAGENAME}}<!-- end of {{{1}}} -->}}}/categories |<!--
This template is equivalent to <nowiki>[[Category:Cat name{{Lang subpage}}|{{En pagename}}]]</nowiki>, but it compute <nowiki>{{If en|...}}</nowiki> two times, while this template compute <nowiki>{{If en|...}}}</nowiki> only once.
+
      -->{{ {{{1|{{NAMESPACE}}:{{PAGENAME}}<!-- end of {{{1}}} -->}}}/categories|<!--
 +
        -->En pagename={{PAGENAME}}|<!--
 +
        -->Lang subpage=<!--
 +
      -->}}<!--
 +
  -->}}<!--
  
[[Category:Internationalization templates|Category/Help]]
+
-->|<!-- else --><!--
  
</noinclude>
+
  -->{{#ifexist: {{{1|{{NAMESPACE}}:{{BASEPAGENAME}}<!-- end of {{{1}}} -->}}}/categories |<!--
{{Help/If en|
+
      -->{{ {{{1|{{NAMESPACE}}:{{BASEPAGENAME}}<!-- end of {{{1}}} -->}}}/categories|<!--
[[Category:{{{1|<nowiki>{{{1}}}</nowiki>}}}|{{PAGENAME}}]]|
+
        -->En pagename={{BASEPAGENAME}}|<!--
[[Category:{{{1|<nowiki>{{{1}}}</nowiki>}}}/{{{lang|{{SUBPAGENAME}} }}}|{{BASEPAGENAME}}]]}}
+
        -->Lang subpage=/{{SUBPAGENAME}}<!--
 +
      -->}}<!--
 +
  -->}}<!--
 +
 
 +
-->}}<!--
 +
 
 +
-->{{#if: |<!--
 +
 
 +
The following statements call {{En pagename}} two times which then call {{If en}} two times.
 +
 
 +
-->{{#ifexist: {{{1|{{NAMESPACE}}:{{En pagename}}<!-- end of {{{1}}} -->}}}/categories |<!--
 +
  -->{{ {{{1|{{NAMESPACE}}:{{En pagename}}<!-- end of {{{1}}} -->}}}/categories }}<!--
 +
-->}}<!--
 +
 
 +
-->}}<!--
 +
 
 +
-->

Текущая версия на 10:30, 6 сентября 2011

PD Important note: When you edit this page, you agree to release your contribution into the public domain. If you don't want this or can't do this because of license restrictions, please don't edit. This page is one of the Public Domain Help Pages, which can be freely copied into fresh wiki installations and/or distributed with MediaWiki software; see Contents for an overview of all pages. See Copying for instructions. PD

This template is to be transcluded in public domain help pages.

This template will transclude the central en categories template, if the template exists. Include this template in any language subpages, to unify the page's categories across languages.

Example

  • title: Help:Deleting a page --> transclude {{Help:Deleting a page/categories}}
  • title: Help:Deleting a page/th --> transclude {{Help:Deleting a page/categories}}
  • title: Help:Deleting a page/subpage --> transclude {{Help:Deleting a page/subpage/categories}}
  • title: Help:Deleting a page/subpage/th --> transclude {{Help:Deleting a page/subpage/categories}}