Difference between revisions of "Template:Warningbox"
From Bashlinux
Line 2: | Line 2: | ||
{| |
{| |
||
|- style="vertical-align: top;" |
|- style="vertical-align: top;" |
||
− | | style="width: 56px;"|[[File:Ambox warning red.png|link=|50px| |
+ | | style="width: 56px;"|[[File:Ambox warning red.png|link=|50px|Warning]] |
|<span style="font-size: 130%; color: #a00">'''WARNING:'''</span> <span style="font-size: 100%">{{{1}}}</span> |
|<span style="font-size: 130%; color: #a00">'''WARNING:'''</span> <span style="font-size: 100%">{{{1}}}</span> |
||
− | |- |
||
− | | |
||
− | | {{#if: {{{australia|}}}{{{canada|}}}{{{india|}}}{{{nz|}}}{{{southafrica|}}}{{{uk|}}}{{{us|}}}{{{ie|}}} | |
||
− | <span style="font-size: 75%">'''Government travel advisories:''' {{#if: {{{australia|}}} |[{{{australia}}} Australia]|}} {{#if: {{{canada|}}} | • [{{{canada}}} Canada]|}} {{#if: {{{india|}}} | • [{{{india}}} India]|}} {{#if: {{{ie|}}} | • [{{{ie}}} Ireland]|}} {{#if: {{{nz|}}} | • [{{{nz}}} New Zealand]|}} {{#if: {{{southafrica|}}} | • [{{{southafrica}}} South Africa]|}} {{#if: {{{uk|}}} | • [{{{uk}}} United Kingdom]|}} {{#if: {{{us|}}} | • [{{{us|}}} United States]|}}</span> |
||
⚫ | |||
|} |
|} |
||
</div>{{#ifeq:{{NAMESPACE}}|{{ns:0}}|[[Category:Has warning box]]}}</includeonly><noinclude> |
</div>{{#ifeq:{{NAMESPACE}}|{{ns:0}}|[[Category:Has warning box]]}}</includeonly><noinclude> |
||
{{documentation}} |
{{documentation}} |
||
+ | === Template usage === |
||
− | <templatedata> |
||
+ | The template can be invoked as follows: |
||
− | { |
||
+ | |||
− | "params": { |
||
+ | <pre style="white-space: pre-wrap;"> |
||
− | "1": { |
||
+ | {{warningbox |
||
− | "required": true, |
||
+ | | '''Title''' Text [[Link1]], [[Link2|Another Link]]<br>This is a paragraph with some warning message for the user. |
||
− | "label": "Warning text", |
||
⚫ | |||
− | "type": "string" |
||
+ | </pre> |
||
− | }, |
||
+ | |||
− | "australia": {}, |
||
+ | ...which produces the following warning box: |
||
− | "canada": {}, |
||
+ | |||
− | "india": {}, |
||
+ | {{warningbox |
||
− | "nz": {}, |
||
+ | | '''Title''' Text [[Link1]], [[Link2|Another Link ]]<br>This is a paragraph with some warning message for the user. |
||
− | "southafrica": {}, |
||
⚫ | |||
− | "uk": {}, |
||
− | "us": {}, |
||
− | "ie": {} |
||
− | }, |
||
− | "description": "Non-obvious dangers to life and limb." |
||
⚫ | |||
− | </templatedata> |
||
− | </noinclude> |
Revision as of 22:54, 2 June 2015
{{#ifeq:μ|
||
{{#ifeq:μ|μ
}} |{{#ifexist:{{#switch: Warningbox
|sandbox|testcases={{ #rel2abs: ../doc }}
|#default=Template:Warningbox/doc
}}
|[[{{fullurl:{{#switch: Warningbox |sandbox|testcases={{ #rel2abs: ../doc }} |#default=Template:Warningbox/doc
}}}} view]] [[{{fullurl:{{#switch: Warningbox
|sandbox|testcases={{ #rel2abs: ../doc }} |#default=Template:Warningbox/doc
}}|action=edit}} edit]] [[{{fullurl:{{#switch: Warningbox
|sandbox|testcases={{ #rel2abs: ../doc }} |#default=Template:Warningbox/doc
}}|action=history}} history]] [[[:Template:Purge]]]
|[[{{fullurl:{{#switch: Warningbox |sandbox|testcases={{ #rel2abs: ../doc }} |#default=Template:Warningbox/doc
}}|action=edit&preload=Template:Documentation/preload}} create]]
}}}} {{#if:|{{{heading}}}|{{#ifeq:Template|Template| Template documentation|Documentation}}}}
{{#ifexist:{{#switch: Warningbox
|sandbox|testcases={{ #rel2abs: ../doc }} |#default=Template:Warningbox/doc
}}
|This documentation is transcluded from [[{{#switch: Warningbox |sandbox|testcases={{ #rel2abs: ../doc }} |#default=Template:Warningbox/doc
}}]]. ([{{fullurl:{{#switch: Warningbox
|sandbox|testcases={{ #rel2abs: ../doc }} |#default=Template:Warningbox/doc
}}|action=edit}} edit] | [{{fullurl:{{#switch: Warningbox
|sandbox|testcases={{ #rel2abs: ../doc }} |#default=Template:Warningbox/doc
}}|action=history}} history])}}{{#switch:Warningbox
|sandbox|testcases= |#default= {{#switch:Template |Template |User= {{#ifexist:Template:Warningbox/sandbox |This template has a sandbox ([{{fullurl:{{#rel2abs:/sandbox}}|action=edit}} edit]) {{#ifexist:Template:Warningbox/testcases |and testcases ([{{fullurl:{{#rel2abs:/testcases}}|action=edit}} edit])}} for editors to experiment. |{{#ifexist: Template:Warningbox/testcases |This template has testcases ([{{fullurl:{{#rel2abs:/testcases}}|action=edit}} edit]) for editors to experiment.}} }}}}}}
</div> {{#if:||{{#ifexist:{{#switch: Warningbox
|sandbox|testcases={{ #rel2abs: ../doc }} |#default=Template:Warningbox/doc
}}|{{ {{#switch: Warningbox
|sandbox|testcases={{ #rel2abs: ../doc }} |#default=Template:Warningbox/doc
}}}}}}}}
</div>
Template usage
The template can be invoked as follows:
{{warningbox | '''Title''' Text [[Link1]], [[Link2|Another Link]]<br>This is a paragraph with some warning message for the user. }}
...which produces the following warning box:
Error creating thumbnail: File missing
|
Title Text Link1, Another Link This is a paragraph with some warning message for the user. {{{2}}} |