Template:Ombox: Difference between revisions

Content deleted Content added
न्हुगु पौ: {{#switch: {{lc: <!--Lower case the result--> <!--If no or empty "demospace" parameter then detect namespace--> {{#if:{{{demospace|}}} | {{{de...
 
No edit summary
Line १:
{{#ifeq:{{{small|}}}|yes
{{#switch:
| {{ombox/core
{{lc: <!--Lower case the result-->
| small = yes
<!--If no or empty "demospace" parameter then detect namespace-->
| type = {{#if:{{{demospacetype|}}}
| image = {{#if:{{{smallimage|}}}| {{{smallimage}}} | {{{image|}}} }}
| {{{demospace}}}
| imageright |= {{#if:{{{pagesmallimageright|}}} | {{{smallimageright}}} | {{{imageright|}}} }}
| class |= {{{demospaceclass|}}}
| <!--Detect the namespace in the "page" parameter-->
| style = {{{style|}}}
{{#ifeq:{{NAMESPACE:{{{page}}} }}|{{TALKSPACE:{{{page}}} }}
| textstyle = {{{textstyle|}}}
| talk
| text |= {{SUBJECTSPACE#if:{{{pagesmalltext|}}}| {{{smalltext}}} | {{{text}}} }}
}}
| <!--No "demospace" or "page" parameters, so detect actual namespace-->
{{#ifeq:{{NAMESPACE}}|{{TALKSPACE}}
| talk
| {{SUBJECTSPACE}}
}}
}}
}}
}}
| {{ombox/core
<!-- Only one of the lines below will be executed -->
| type = {{{type|}}}
<!-- Respecting empty parameters on purpose -->
| image = {{{image|}}}
| main <!--"demospace=main" or {{SUBJECTSPACE}}={{ns:0}}=""-->
| | imageright = {{{main| {{{otherimageright|}}} }}}
| talk | class = {{{talkclass| {{{other|}}} }}}
| user | style = {{{userstyle| {{{other|}}} }}}
| wikipediatextstyle = {{{wikipediatextstyle| {{{other|}}} }}}
| text = {{{text}}}
| file
}}
| image = {{{file| {{{image| {{{other|}}} }}} }}}
}}<noinclude>{{documentation}}<!-- Add categories and interwikis to the /doc subpage, not here! --></noinclude>
| mediawiki = {{{mediawiki| {{{other|}}} }}}
| template = {{{template| {{{other|}}} }}}
| help = {{{help| {{{other|}}} }}}
| category = {{{category| {{{other|}}} }}}
| portal = {{{portal| {{{other|}}} }}}
| book = {{{book| {{{other|}}} }}}
| other
| #default = {{{other|}}} <!--"demospace=other" or a new namespace-->
 
}}<!--End switch--><noinclude>
 
{{pp-template}}
{{documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>