「テンプレート:Namespace detect」の版間の差分
*>Foomin10 編集の要約なし |
細 (1版) |
||
(4人の利用者による、間の4版が非表示) | |||
1行目: | 1行目: | ||
{{#switch: | {{#switch: | ||
{{lc: <!--Lower case the result--> | |||
<!--If no or empty "demospace" parameter then detect namespace--> | |||
{{#if:{{{demospace|}}} | |||
| {{{demospace}}} | |||
| {{#switch:{{NAMESPACE}} | |||
|{{ns:0}} = main<!-- 標準名前空間 --> | |||
|{{TALKSPACE}} = talk<!-- 会話用名前空間 --> | |||
|{{ns:2}} = user<!-- 利用者名前空間 --> | |||
|{{ns:4}} = wikipedia<!-- Wikipedia名前空間 --> | |||
|{{ns:6}} = file<!-- ファイル名前空間 --> | |||
|{{ns:8}} = mediawiki<!-- MediaWiki名前空間 --> | |||
|{{ns:10}} = template<!-- Template名前空間 --> | |||
|{{ns:12}} = help<!-- Help名前空間 --> | |||
|{{ns:14}} = category<!-- Category名前空間 --> | |||
|{{ns:100}} = portal<!-- Portal名前空間 --> | |||
| #default = {{NAMESPACE}}<!-- 上記以外の名前空間 --> | |||
}} | |||
}} | |||
}} | |||
<!-- Only one of the lines below will be executed --> | |||
-- Only one of the lines below will be executed -- | <!-- Respecting empty parameters on purpose --> | ||
-- Respecting empty parameters on purpose -- | | main = {{{main| {{{other|}}} }}} | ||
| talk = {{{talk| {{{other|}}} }}} | |||
| user = {{{user| {{{other|}}} }}} | |||
| wikipedia = {{{wikipedia| {{{other|}}} }}} | |||
| file | |||
| image = {{{file| {{{image| {{{other|}}} }}} }}} | |||
| mediawiki = {{{mediawiki| {{{other|}}} }}} | |||
| template = {{{template| {{{other|}}} }}} | |||
| help = {{{help| {{{other|}}} }}} | |||
| category = {{{category| {{{other|}}} }}} | |||
| portal = {{{portal| {{{other|}}} }}} | |||
| other | |||
| #default = {{{other|}}} <!--"demospace=other" or a new namespace--> | |||
-->}}<noinclude> | }}<!--End switch--><noinclude> | ||
{{documentation}} | {{documentation}} | ||
<!-- Add categories and interwikis to the /doc subpage, not here! --> | <!-- Add categories and interwikis to the /doc subpage, not here! --> | ||
</noinclude> | </noinclude> |
2014年3月8日 (土) 14:05時点における最新版
テンプレートの解説[[{{fullurl:</noinclude>:/doc| action=edit&preload=Template:Documentation/preload }} 作成]]