Difference between revisions of "Template:Ambox"
(from /sandbox per edit request) |
|||
(One intermediate revision by one user not shown) | |||
Line 1: | Line 1: | ||
{{#ifeq:{{{subst}}}|SUBST | {{#ifeq:{{{subst}}}|SUBST | ||
|{{#if:{{{name|}}} | |{{#if:{{{name|}}} | ||
− | |{{Error|Template {{ | + | |{{Error|Template {{tlx|{{{name}}}}} has been incorrectly substituted.}} |
}}[[Category:Pages with incorrectly substituted templates]] | }}[[Category:Pages with incorrectly substituted templates]] | ||
− | }}{{#ifeq:{{{small}}}|left | + | }}{{Ambox/{{#ifeq:{{{small}}}|left|small|core}} |
− | |{{ | + | |type = {{{type|}}} |
− | + | |image = {{{image|}}} | |
− | + | |smallimage = {{#if:{{{smallimage|}}}|{{{smallimage}}}|{{{image|}}}}} | |
− | + | |imageright = {{{imageright|}}} | |
− | + | |smallimageright = {{#if:{{{smallimageright|}}}|{{{smallimageright}}}|{{{imageright|}}}}} | |
− | + | |class = ambox-{{#switch:{{{type|}}} | |
− | + | |speedy = speedy | |
− | + | |delete = delete | |
− | + | |content = content | |
− | + | |style = style | |
− | + | |move = move | |
− | | | + | |protection = protection |
− | + | |notice|#default = notice | |
− | + | }} {{{class|}}} | |
− | + | |style = {{{style|}}} | |
− | + | |textstyle = {{{textstyle|}}} | |
− | + | |smalltext = {{{smalltext|}}} | |
− | }} | + | |talk = {{#switch:{{{talk|¬}}} |
+ | |¬ = <!-- No talk link used --> | ||
+ | | = {{#ifeq:{{FULLROOTPAGENAME}}|Template:{{PAGENAME:{{{name}}}}}|#}} | ||
+ | |#default = {{{talk}}} | ||
}} | }} | ||
− | |{{ | + | |issue = {{#switch:{{{sect|¬}}} |
− | + | |¬ = <!-- No section parameter used --> | |
− | | | + | | = This article |
− | + | |This {{{sect}}} | |
− | + | }} {{{issue<includeonly>|</includeonly>}}} {{{text|}}} | |
− | + | |fix = {{{fix<includeonly>|</includeonly>}}} | |
− | + | |date = {{#switch:{{{date|¬}}} | |
− | | | + | |¬ = <!-- No date used --> |
− | | | + | | = {{#ifeq:{{FULLROOTPAGENAME}}|Template:{{PAGENAME:{{{name}}}}}|{{CURRENTMONTHNAME}} {{CURRENTYEAR}}}} |
− | + | |#default = {{{date}}} | |
− | + | ||
− | + | ||
}} | }} | ||
+ | |info = {{{info|}}} | ||
}}{{Category handler | }}{{Category handler | ||
+ | |nocat={{{nocat|<noinclude>true</noinclude>}}} | ||
|main={{Ambox/category | |main={{Ambox/category | ||
|cat={{{cat|{{{category|}}}}}} | |cat={{{cat|{{{category|}}}}}} | ||
|all={{{all|}}} | |all={{{all|}}} | ||
− | | | + | |date={{{date|}}} |
− | | | + | }}{{Ambox/category |
− | | | + | |cat={{{cat2|{{{category2|}}}}}} |
− | | | + | |all={{{all2|}}} |
+ | |date={{{date|}}} | ||
+ | }}{{Ambox/category | ||
+ | |cat={{{cat3|{{{category3|}}}}}} | ||
+ | |all={{{all3|}}} | ||
|date={{{date|}}} | |date={{{date|}}} | ||
}} | }} | ||
− | |template={{#ifeq:{{ | + | |template={{#switch:Template:{{{name|}}} |
− | + | |{{FULLPAGENAME}} = [[Category:Article message templates]]{{#ifexpr:{{#ifeq:{{{issue|¬}}}|¬|1|0}}+{{#ifeq:{{{fix|¬}}}|¬|1|0}}+{{#ifeq:{{{subst|¬}}}|¬|1|0}} | |
− | + | |[[Category:Article message templates with missing parameters|{{#expr:{{#ifeq:{{{issue|¬}}}|¬|1|0}}+{{#ifeq:{{{fix|¬}}}|¬|1|0}}+{{#ifeq:{{{subst|¬}}}|¬|1|0}}}}]] | |
− | + | }}{{#if:{{{category|}}}{{{category2|}}}{{{category3|}}} | |
+ | |[[Category:Article message templates with missing parameters|C]] | ||
}} | }} | ||
− | + | |Template: = {{#ifeq:{{BASEPAGENAME}}|{{SUBPAGENAME}}|[[Category:Article message templates with missing parameters]]}} | |
− | + | ||
− | + | ||
}} | }} | ||
− | }} | + | }} |
− | + | ||
− | + | ||
− | + |
Latest revision as of 12:53, 27 February 2013
{{#ifeq:{{{subst}}}|SUBST
|{{#if: |<{{#switch:{{{tag}}} |p=p |span=span |div=div |#default=strong
}} class="error">Template {{{{#if: |subst:}}[[Template:{{{name}}}|{{{name}}}]]{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||…}}}}
has been incorrectly substituted.</{{#switch:{{{tag}}}
|p=p |span=span |div=div |#default=strong
}}>
}}
}}{{Ambox/{{#ifeq:{{{small}}}|left|small|core}}
|type = |image = |smallimage = {{#if:|{{{smallimage}}}|}} |imageright = |smallimageright = {{#if:|{{{smallimageright}}}|}} |class = ambox-{{#switch: |speedy = speedy |delete = delete |content = content |style = style |move = move |protection = protection |notice|#default = notice }} |style = |textstyle = |smalltext = |talk = {{#switch:¬ |¬ = | = {{#ifeq:{{ safesubst:#if: {{safesubst:#invoke:Ns has subpages|main}} | {{ safesubst:#titleparts:{{ safesubst:#if:|{{{1}}}|Template:Ambox}}|1}} | {{ safesubst:#if:|{{{1}}}|Template:Ambox}}
}}|Template:|#}}
|#default = {{{talk}}} }} |issue = {{#switch:¬ |¬ = | = This article |This {{{sect}}} }} {{{issue}}} |fix = {{{fix}}} |date = {{#switch:¬ |¬ = | = {{#ifeq:{{ safesubst:#if: {{safesubst:#invoke:Ns has subpages|main}} | {{ safesubst:#titleparts:{{ safesubst:#if:|{{{1}}}|Template:Ambox}}|1}} | {{ safesubst:#if:|{{{1}}}|Template:Ambox}}
}}|Template:|December 2024}}
|#default = {{{date}}} }} |info =
}}{{#if:
{{#ifeq: true | true | dontcat }}{{#ifeq: | no | dontcat }}{{#switch: ¬ | yes | ¬ = | #default = dontcat }}{{#switch: | no = {{#switch: {{#if: | {{#if:{{#titleparts:|0|3}} | subsubpage | {{#if:{{#titleparts:|0|2}} | subpage | basepage }} }} | {{#if:{{#titleparts:Template:Ambox|0|3}} | subsubpage | {{#if:{{#titleparts:Template:Ambox|0|2}} | subpage | basepage }} }} }}
| basepage =
| subpage = dontcat
| subsubpage = dontcat
}}
| only = {{#switch: {{#if: | {{#if:{{#titleparts:|0|3}} | subsubpage | {{#if:{{#titleparts:|0|2}} | subpage | basepage }} }} | {{#if:{{#titleparts:Template:Ambox|0|3}} | subsubpage | {{#if:{{#titleparts:Template:Ambox|0|2}} | subpage | basepage }} }} }}
| basepage = dontcat
| subpage = | subsubpage = }}
}}
| |
{{#switch: {{#ifeq: true | false | | {{#ifeq: | yes | | {{#ifeq: | yes | | {{#if:x
|
{{#if:{{#titleparts:{{#if:| | Template:Ambox }}|0|2}} | | }}
}}
}} }} }} | hide = | #default = {{#ifeq: h0#384!5nea+w9 | {{#if: |{{#if: |{{#ifexist:Category: from | | }} |[[Category:]] }}
}}{{#if:
|[[Category:]]
}}{{#if:
|{{#if: |[[Category:{{{cat2}}} from ]]{{#ifexist:Category:{{{cat2}}} from | | }} |[[Category:{{{cat2}}}]] }}
}}{{#if:
|[[Category:{{{all2}}}]]
}}{{#if:
|{{#if: |[[Category:{{{cat3}}} from ]]{{#ifexist:Category:{{{cat3}}} from | | }} |[[Category:{{{cat3}}}]] }}
}}{{#if:
|[[Category:{{{all3}}}]]
}}{{#if:
|{{#if: |{{#ifexist:Category: from | | }} |[[Category:]] }}
}}{{#if:
|[[Category:]]
}}{{#if:
|{{#if: |[[Category:{{{cat2}}} from ]]{{#ifexist:Category:{{{cat2}}} from | | }} |[[Category:{{{cat2}}}]] }}
}}{{#if:
|[[Category:{{{all2}}}]]
}}{{#if:
|{{#if: |[[Category:{{{cat3}}} from ]]{{#ifexist:Category:{{{cat3}}} from | | }} |[[Category:{{{cat3}}}]] }}
}}{{#if:
|[[Category:{{{all3}}}]]
}}{{#if:
|{{#if: |{{#ifexist:Category: from | | }} |[[Category:]] }}
}}{{#if:
|[[Category:]]
}}{{#if:
|{{#if: |[[Category:{{{cat2}}} from ]]{{#ifexist:Category:{{{cat2}}} from | | }} |[[Category:{{{cat2}}}]] }}
}}{{#if:
|[[Category:{{{all2}}}]]
}}{{#if:
|{{#if: |[[Category:{{{cat3}}} from ]]{{#ifexist:Category:{{{cat3}}} from | | }} |[[Category:{{{cat3}}}]] }}
}}{{#if:
|[[Category:{{{all3}}}]]
}}
| {{#switch: {{#if: | {{{demospace}}} | {{#if: | {{#ifeq:| | talk | }} | {{#ifeq:template|template talk | talk | template }} }} }}
| main | = | talk = | user = | wikipedia = | file | image = | mediawiki = | template = | help = | category = | portal = | book = | other | #default =
}}
| {{#iferror: {{#expr: 1 + {{#switch: {{#if: | {{{demospace}}} | {{#if: | {{#ifeq:| | talk | }} | {{#ifeq:template|template talk | talk | template }} }} }}
| main | = {{#if:
|{{#if: |{{#ifexist:Category: from | | }} |[[Category:]] }}
}}{{#if:
|[[Category:]]
}}{{#if:
|{{#if: |[[Category:{{{cat2}}} from ]]{{#ifexist:Category:{{{cat2}}} from | | }} |[[Category:{{{cat2}}}]] }}
}}{{#if:
|[[Category:{{{all2}}}]]
}}{{#if:
|{{#if: |[[Category:{{{cat3}}} from ]]{{#ifexist:Category:{{{cat3}}} from | | }} |[[Category:{{{cat3}}}]] }}
}}{{#if:
|[[Category:{{{all3}}}]]
}}{{#if:
|{{#if: |{{#ifexist:Category: from | | }} |[[Category:]] }}
}}{{#if:
|[[Category:]]
}}{{#if:
|{{#if: |[[Category:{{{cat2}}} from ]]{{#ifexist:Category:{{{cat2}}} from | | }} |[[Category:{{{cat2}}}]] }}
}}{{#if:
|[[Category:{{{all2}}}]]
}}{{#if:
|{{#if: |[[Category:{{{cat3}}} from ]]{{#ifexist:Category:{{{cat3}}} from | | }} |[[Category:{{{cat3}}}]] }}
}}{{#if:
|[[Category:{{{all3}}}]]
}}{{#if:
|{{#if: |{{#ifexist:Category: from | | }} |[[Category:]] }}
}}{{#if:
|[[Category:]]
}}{{#if:
|{{#if: |[[Category:{{{cat2}}} from ]]{{#ifexist:Category:{{{cat2}}} from | | }} |[[Category:{{{cat2}}}]] }}
}}{{#if:
|[[Category:{{{all2}}}]]
}}{{#if:
|{{#if: |[[Category:{{{cat3}}} from ]]{{#ifexist:Category:{{{cat3}}} from | | }} |[[Category:{{{cat3}}}]] }}
}}{{#if:
|[[Category:{{{all3}}}]]
}} | talk = | user = | wikipedia = | file | image = | mediawiki = | template = {{#switch:Template:
|Template:Ambox ={{#ifexpr:{{#ifeq:¬|¬|1|0}}+{{#ifeq:¬|¬|1|0}}+{{#ifeq:¬|¬|1|0}} | }}{{#if: | }} |Template: = {{#ifeq:Ambox|Ambox|}} }}
| help = | category = | portal = | book = | other | #default =
}} }} | {{#switch:
{{#if: | {{{demospace}}} | {{#if: | {{#ifeq:| | talk | }} | {{#ifeq:template|template talk | talk | template }} }} }}
| main | = {{#if:
|{{#if: |{{#ifexist:Category: from | | }} |[[Category:]] }}
}}{{#if:
|[[Category:]]
}}{{#if:
|{{#if: |[[Category:{{{cat2}}} from ]]{{#ifexist:Category:{{{cat2}}} from | | }} |[[Category:{{{cat2}}}]] }}
}}{{#if:
|[[Category:{{{all2}}}]]
}}{{#if:
|{{#if: |[[Category:{{{cat3}}} from ]]{{#ifexist:Category:{{{cat3}}} from | | }} |[[Category:{{{cat3}}}]] }}
}}{{#if:
|[[Category:{{{all3}}}]]
}}{{#if:
|{{#if: |{{#ifexist:Category: from | | }} |[[Category:]] }}
}}{{#if:
|[[Category:]]
}}{{#if:
|{{#if: |[[Category:{{{cat2}}} from ]]{{#ifexist:Category:{{{cat2}}} from | | }} |[[Category:{{{cat2}}}]] }}
}}{{#if:
|[[Category:{{{all2}}}]]
}}{{#if:
|{{#if: |[[Category:{{{cat3}}} from ]]{{#ifexist:Category:{{{cat3}}} from | | }} |[[Category:{{{cat3}}}]] }}
}}{{#if:
|[[Category:{{{all3}}}]]
}}{{#if:
|{{#if: |{{#ifexist:Category: from | | }} |[[Category:]] }}
}}{{#if:
|[[Category:]]
}}{{#if:
|{{#if: |[[Category:{{{cat2}}} from ]]{{#ifexist:Category:{{{cat2}}} from | | }} |[[Category:{{{cat2}}}]] }}
}}{{#if:
|[[Category:{{{all2}}}]]
}}{{#if:
|{{#if: |[[Category:{{{cat3}}} from ]]{{#ifexist:Category:{{{cat3}}} from | | }} |[[Category:{{{cat3}}}]] }}
}}{{#if:
|[[Category:{{{all3}}}]]
}} | talk = | user = | wikipedia = | file | image = | mediawiki = | template = {{#switch:Template:
|Template:Ambox ={{#ifexpr:{{#ifeq:¬|¬|1|0}}+{{#ifeq:¬|¬|1|0}}+{{#ifeq:¬|¬|1|0}} | }}{{#if: | }} |Template: = {{#ifeq:Ambox|Ambox|}} }}
| help = | category = | portal = | book = | other | #default =
}} | }}
}} }}
}}