Шаблон:Mbox — различия между версиями

Материал из Аэроскан Сервис
Перейти к: навигация, поиск
(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}}
+
{{  
|{{ns:0}}        = ambox
+
  {{namespace detect
|{{ns:Image}}    = imbox
+
  | demospace = {{{demospace|}}}
  |{{ns:Category}} = cmbox
+
  | main      = ambox
|#default        = dmbox
+
<!-- | talk  = tmbox -->
}}
+
  | image    = imbox
|{{#ifeq:{{{type|μ}}}|μ||type}}={{{type|}}}
+
  | category = cmbox
|{{#ifeq:{{{image|μ}}}|μ||image}}={{{image|}}}
+
  | other    = dmbox
|{{#ifeq:{{{imageright|μ}}}|μ||imageright}}={{{imageright|}}}
+
  }}
|{{#ifeq:{{{style|μ}}}|μ||style}}={{{style|}}}
+
<!-- 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:{{{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>

Версия 04:36, 23 мая 2008

Шаблон:Dmbox

30px Template documentation[create]