Template:Template other/doc:修订间差异
小 机器人添加:ky,tn,ang,uz,bh,mi,srn,bxr,sw,sq,nso,am,ga,my,kaa,pt,tw,xmf,new,su,sr,ckb,pa,rue,gu,sco,lmo,csb,dv,map-bms,chy,arz,ie,hif,ak,ml,vi,zh-yue,pi,sa,ht,tg,ku,mn,th,ca,la,bg,mr,te,arc,km,zu,gv,bo,jv,ab,pag,gd,af,ceb,et,bn,br,el,ba,pnb,cr,kg... |
小 移至子分類 |
||
(未显示3个用户的3个中间版本) | |||
第1行: | 第1行: | ||
<includeonly><!-- 在這裡加入模板的保護標識 --></includeonly> |
|||
{{Documentation subpage}} |
{{Documentation subpage}} |
||
<!-- 在本行下編輯模板說明 --> |
<!-- 在本行下編輯模板說明 --> |
||
{{high-use|14393}}{{缺乏中文说明}} |
|||
This is the {{tl|template other}} meta-template. |
This is the {{tl|template other}} meta-template. |
||
第74行: | 第73行: | ||
=== 參見 === |
=== 參見 === |
||
{{namespace detect see also}} |
{{namespace detect see also}} |
||
<includeonly>{{Sandbox other||<!-- 本行下加入模板的分類,跨維基連結加入Wikidata(參見[[Wikipedia:Wikidata]]) --> |
|||
<includeonly> |
|||
[[Category:命名空間操作模板]] |
|||
<!-- 本行下加入模板的分類 --> |
|||
[[Category: |
[[Category:模板页的模板]] |
||
}}</includeonly> |
|||
<!-- 本行下加入模板的跨語言鏈接 --> |
|||
[[ab:Ашаблон:Template other]] |
|||
[[ace:Pola:Template other]] |
|||
[[af:Sjabloon:Template other]] |
|||
[[ak:Şablon:Template other]] |
|||
[[am:መለጠፊያ:Template other]] |
|||
[[ang:Bysen:Template other]] |
|||
[[ar:قالب:قالب أخرى]] |
|||
[[arc:ܩܠܒܐ:ܩܠܒܐ ܐܚܪܝܢܐ]] |
|||
[[arz:قالب:قالب تانى]] |
|||
[[as:সাঁচ:Template other]] |
|||
[[ba:Ҡалып:Template other]] |
|||
[[bg:Шаблон:Template other]] |
|||
[[bh:टेम्पलेट:Template other]] |
|||
[[bi:Template:Template other]] |
|||
[[bjn:Citakan:Template other]] |
|||
[[bn:টেমপ্লেট:Template other]] |
|||
[[bo:Template:Template other]] |
|||
[[br:Patrom:Template other]] |
|||
[[bug:Templat:Template other]] |
|||
[[bxr:Template:Template other]] |
|||
[[ca:Plantilla:Template other]] |
|||
[[ceb:Plantilya:Template other]] |
|||
[[chy:Template:Template other]] |
|||
[[ckb:داڕێژە:Template other]] |
|||
[[cr:Template:Template other]] |
|||
[[csb:Szablóna:Template other]] |
|||
[[cy:Nodyn:Template other]] |
|||
[[diq:Şablon:Template other]] |
|||
[[dv:ފަންވަތް:Template other]] |
|||
[[el:Πρότυπο:Template other]] |
|||
[[en:Template:Template other]] |
|||
[[eo:Ŝablono:Ĉu ŝablono]] |
|||
[[et:Mall:Template other]] |
|||
[[fa:الگو:Template other]] |
|||
[[fr:Modèle:Template other]] |
|||
[[ga:Teimpléad:Template other]] |
|||
[[gag:Şablon:Template other]] |
|||
[[gd:Teamplaid:Template other]] |
|||
[[gu:ઢાંચો:Template other]] |
|||
[[gv:Clowan:Template other]] |
|||
[[hi:साँचा:Template other]] |
|||
[[hif:Template:Template other]] |
|||
[[ht:Modèl:Template other]] |
|||
[[id:Templat:Template other]] |
|||
[[ie:Avise:Template other]] |
|||
[[ilo:Plantilia:Template other]] |
|||
[[is:Snið:Template other]] |
|||
[[ja:Template:Template other]] |
|||
[[jv:Cithakan:Template other]] |
|||
[[kaa:Shablon:Template other]] |
|||
[[kg:Template:Template other]] |
|||
[[kl:Ilisserut:Template other]] |
|||
[[km:ទំព័រគំរូ:Template other]] |
|||
[[kn:ಟೆಂಪ್ಲೇಟು:Template other]] |
|||
[[ko:틀:틀 기타]] |
|||
[[koi:Шаблон:Template other]] |
|||
[[ks:فرما:Template other]] |
|||
[[ku:Şablon:Template other]] |
|||
[[ky:Калып:Template other]] |
|||
[[la:Formula:Template other]] |
|||
[[lmo:Mudel:Template other]] |
|||
[[lo:ແມ່ແບບ:Template other]] |
|||
[[lt:Šablonas:Template other]] |
|||
[[map-bms:Cithakan:Template other]] |
|||
[[mg:Endrika:Template other]] |
|||
[[mi:Template:Template other]] |
|||
[[min:Templat:Template other]] |
|||
[[mk:Шаблон:Template other]] |
|||
[[ml:ഫലകം:Template other]] |
|||
[[mn:Загвар:Template other]] |
|||
[[mr:साचा:Template other]] |
|||
[[my:Template:Template other]] |
|||
[[mzn:شابلون:Template other]] |
|||
[[ne:ढाँचा:Template other]] |
|||
[[new:Template:Template other]] |
|||
[[nso:Template:Template other]] |
|||
[[or:ଛାଞ୍ଚ:Template other]] |
|||
[[pa:ਫਰਮਾ:Template other]] |
|||
[[pag:Template:Template other]] |
|||
[[pap:Template:Template other]] |
|||
[[pi:पटिरूप:Template other]] |
|||
[[pnb:Template:Template other]] |
|||
[[pt:Predefinição:Template other]] |
|||
[[ro:Format:Template other]] |
|||
[[ru:Шаблон:Template other]] |
|||
[[rue:Шаблона:Template other]] |
|||
[[sa:फलकम्:Template other]] |
|||
[[sco:Template:Template other]] |
|||
[[sd:سانچو:Template other]] |
|||
[[si:සැකිල්ල:සැකිල්ල වෙනත්]] |
|||
[[simple:Template:Template other]] |
|||
[[sl:Predloga:Template other]] |
|||
[[so:Template:Template other]] |
|||
[[sq:Stampa:Template other]] |
|||
[[sr:Шаблон:Template other]] |
|||
[[srn:Ankra:Lang-fra]] |
|||
[[su:Citakan:Template other]] |
|||
[[sw:Kigezo:Template other]] |
|||
[[ta:வார்ப்புரு:Template other]] |
|||
[[te:మూస:Template other]] |
|||
[[tg:Шаблон:Template other]] |
|||
[[th:แม่แบบ:Template other]] |
|||
[[tl:Padron:Template other]] |
|||
[[tn:Template:Template other]] |
|||
[[tpi:Templet:Template other]] |
|||
[[tr:Şablon:Template other]] |
|||
[[tw:Template:Template other]] |
|||
[[uk:Шаблон:Template other]] |
|||
[[ur:سانچہ:Template other]] |
|||
[[uz:Andoza:Template other]] |
|||
[[vi:Bản mẫu:Template other]] |
|||
[[wa:Modele:Template other]] |
|||
[[war:Batakan:Template other]] |
|||
[[xmf:თარგი:Template other]] |
|||
[[yo:Àdàkọ:Template other]] |
|||
[[zh-yue:Template:Template other]] |
|||
[[zu:Template:Template other]] |
|||
</includeonly> |
2021年10月16日 (六) 07:08的最新版本
![]() | 此頁面是Template:Template other的Template文档。 此頁面可能包含了模板的使用說明、分類和其他内容。 |
![]() | 此Template文档被引用於約694,000個頁面。 為了避免造成大規模的影響,所有對此Template文档的編輯應先於沙盒、測試樣例或您的沙盒上測試。 測試後無誤的版本可以一次性地加入此Template文档中,但是修改前請務必於討論頁發起討論。 模板引用數量會自動更新。 |
![]() | 此模板的文档不存在、不全面或不能详细描述其功能及/或其代码中的参数。请帮助扩充并改进其文档。 |
This is the {{template other}} meta-template.
It helps other templates detect if they are on a "Template:" page or some "other" type of page.
用法
[编辑]This template usually takes two parameters, like this:
{{template other | Template page text | Other pages text }}
If the template is on a "Template:" page, it will return this:
- Template page text
If the template is on any other page, it will return this:
- Other pages text
A typical usage case could be to make it so that a template only adds a category when not on a template page. Thus not adding the template itself and other templates that are built with it to the category. Like this:
{{template other | | [[Category:Some maintenance category]] }}
Note that in the example above the "template" parameter was left empty.
Demospace
[编辑]For testing and demonstration purposes this template can take a parameter named demospace.
- If it has the value template it returns the template page text.
- It if has the value other or any other value such as the name of some other namespace it returns the other pages text.
- If the parameter is empty or undefined, the actual page type determines the result.
Like this:
{{template other | Template page text | Other pages text | demospace = template }}
No matter on what kind of page the code above is used it will return this:
- Template page text
You can make it so your template also understands the demospace parameter. That means you can demonstrate the different appearances of your template in the documentation for your template. Then do like this:
{{template other | Template page text | Other pages text | demospace = {{{demospace|}}} }}
Technical details
[编辑]This template detects "Template talk:" pages as type other.
This template works like {{main talk other}}, for more examples and technical details see full documentation there.
參見
[编辑]便於偵測命名空間的模板群:
- {{main other}} – 用於條目模板。
- {{talk other}} – 用於討論頁模板。
- {{user other}} – 用於用戶頁模板。
- {{wikipedia other}} – 用以偵測"Wikipedia:"計畫頁面。
- {{file other}} – 用於檔案(圖像)模板
- {{template other}} – 用以偵測模板頁。
- {{help other}} – 用於幫助頁模板。
- {{category other}} – 用於分類頁模板。
- {{portal other}} – 用於主題頁模板。
更複雜的命名空間偵測模板:
- {{main talk other}} – 區分某些命名空間。
- {{main talk category other}} – 區分某些命名空間。
- {{namespace detect}} – 多功能模板。
- {{namespace detect showall}} – 超多功能模板。
- {{talkspace detect}} - 偵測不同命名空間的討論頁面。
Technical stuff:
- Wikipedia:命名空間 – Lists all the namespaces.
- Help:魔術字 – About
{{NAMESPACE}}
etc. - Help:解析器函数 – About
{{#ifeq:|||}}
etc.