「テンプレート:Main other」の版間の差分

提供:KAZE.WIKI
ja>ネイ
(-改行)
 
en>Xaosflux
(<!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! -->)
12行目: 12行目:
| #default = {{{2|}}}
| #default = {{{2|}}}
}}<noinclude>
}}<noinclude>
{{Documentation}}
 
<!-- Add categories and interwikis to the /doc subpage, not here! -->
{{documentation}}
<!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! -->
</noinclude>
</noinclude>

2021年12月11日 (土) 01:08時点における版


テンプレートの解説[表示] [編集] [履歴] [キャッシュを破棄]

このテンプレートは、他のテンプレート内で使用し、記事名前空間とそれ以外の名前空間を判別して表示内容を変えるために使用します。

使い方

通常、引数を2個取ります。

{{main other | 記事の名前空間用のテキスト | それ以外の名前空間用のテキスト }}

もしテンプレートが記事ページで使用されていれば 記事の名前空間用のテキスト を、

それ以外のページで使用されていれば それ以外の名前空間用のテキスト を表示します。

典型的な使い方としては、記事のページのみカテゴリを追加したい場合があります。

{{main other | [[Category:カテゴリ]] }}

関連項目