틀:Mbox: 두 판 사이의 차이

Revi HQ
내용 추가됨 내용 삭제됨
(add doc)
(Changed the "#ifeq:" statements to "#if:", changed to using {{namespace detect}} so a demospace parameter can be used and talk space can be easily detected, and other fixes.)
1번째 줄: 1번째 줄:
{{
{{ {{#switch:{{NAMESPACE}}
{{namespace detect
|{{ns:0}} = ambox
| demospace = {{{demospace|}}}
|{{ns:Image}} = imbox
| main = ambox
|{{ns:Category}} = cmbox
<!-- | talk = tmbox -->
|#default = dmbox
| image = imbox
}}
| category = cmbox
|{{#ifeq:{{{type|μ}}}|μ||type}}={{{type|}}}
| other = dmbox
|{{#ifeq:{{{image|μ}}}|μ||image}}={{{image|}}}
}}
|{{#ifeq:{{{imageright|μ}}}|μ||imageright}}={{{imageright|}}}
<!-- These if-cases soon unnecessary since all but ambox and dmbox can take empty parameters, and ambox and dmbox will be fixed. This code means we are feeding several empty numbered parameters but that doesn't matter since the mboxes don't use numbered parameters. -->
|{{#ifeq:{{{style|μ}}}|μ||style}}={{{style|}}}
|{{#ifeq:{{{textstyle|μ}}}|μ||textstyle}}={{{textstyle|}}}
| {{#if:{{{type|}}}| type={{{type|}}} }}
|{{#ifeq:{{{text|μ}}}|μ||text}}={{{text|}}}
| {{#if:{{{image|}}}| image={{{image|}}} }}
| {{#if:{{{imageright|}}}| imageright={{{imageright|}}} }}
| {{#if:{{{style|}}}| style={{{style|}}} }}
| {{#if:{{{textstyle|}}}| textstyle={{{textstyle|}}} }}
| {{#if:{{{text|}}}| text={{{text|}}} }}

}}<noinclude>
}}<noinclude>

{{documentation}}
<!-- {{pp-template|small=yes}} -->
{{Documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
</noinclude>

2008년 5월 23일 (금) 11:36 판

{{

 틀:Namespace detect

| | | | | |

}}

Template documentation[create]