"模板:Transclude/doc" 修訂間的差異

出自 陳富國維基館
前往: 導覽, 搜尋
(←建立内容为“<includeonly>{{pp-template}}</includeonly><noinclude>{{template doc page viewed directly}}</noinclude> 參數1填的是一個頁面,如果參數1...”的新頁面)
小 (1個修訂)
 
(未顯示同一使用者於中間所作的 1 次修訂)
行 1: 行 1:
−
<includeonly>{{pp-template}}</includeonly><noinclude>{{template doc page viewed directly}}</noinclude>
+
{{Documentation subpage}}
−
參數1填的是一個頁面,如果參數1沒有指定名字空間的話(且無前導冒號)就會在前面加上"Template:"。
+
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
 +
 
 +
This template resolves page names as they would be handled by MediaWiki's template-transclusion process.  It thereby removes ambiguity when doing ''other'' things with template pagenames, e.g. linking.
 +
 
 +
Key usage is in [[Template:Navbox|navboxes']] view, discuss, edit (v,d,e) menu.
 +
 
 +
=== Usage ===
 +
 
 +
*<code><nowiki>{{transclude| Template:Foo }}</nowiki></code> &rarr; '''{{transclude|Template:Foo}}'''
 +
*<code><nowiki>{{transclude| Category:Foo }}</nowiki></code> &rarr; '''{{transclude|Category:Foo}}'''
 +
*<code><nowiki>{{transclude| Foo }}</nowiki></code> &rarr; '''{{transclude|Foo}}'''
 +
*<code><nowiki>{{transclude| :Foo }}</nowiki></code> &rarr; '''{{transclude|:Foo}}'''
 +
*<code><nowiki>{{transclude| :File:Foo }}</nowiki></code> &rarr; '''{{transclude|:File:Foo}}'''
 +
 
 +
<includeonly>
 +
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
 +
[[Category:Formatting templates|Transclude]]
 +
 
 +
</includeonly>

於 2013年3月15日 (五) 12:53 的最新修訂

This template resolves page names as they would be handled by MediaWiki's template-transclusion process. It thereby removes ambiguity when doing other things with template pagenames, e.g. linking.

Key usage is in navboxes' view, discuss, edit (v,d,e) menu.

Usage

  • {{transclude| Template:Foo }} → 模板:Foo
  • {{transclude| Category:Foo }} → 分類:Foo
  • {{transclude| Foo }} → Template:Foo
  • {{transclude| :Foo }} → Foo
  • {{transclude| :File:Foo }} → 檔案:Foo