Template:Messagebox: Difference between revisions

From MediaWiki
Jump to navigationJump to search
Derik (talk | contribs)
mNo edit summary
Tigerpaw28 (talk | contribs)
Enabling category inclusion for File namespace so that Template:BadImage works. Possibly a more eloquent way to do it, but this works for now.
 
(22 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<noinclude>
{| style="background: transparent; float:left;"
|<pre>{{Messagebox|
|message_text=
|header=
|image_name=
|talkpage=
|categories=
|mouseover=
|image_width=
|border=
|bgcolor=
|justification=
}}
</pre>
|}
</noinclude>
<includeonly><center>
<includeonly><center>
{| cellspacing="0" {{ #if:{{{width|}}}| style="width:{{{width}}};"|}} border=
{| cellspacing="0" style="{{ #if:{{{width|}}}| width:{{{width}}};|}}{{ #if:{{{clearall|}}}| clear: both;|}}" {{#ifeq:{{{print|false}}}|false|class="noprint"}}
|-
|-
| style="padding:0;text-align:right;" |<div style="width:100%;padding:.5em; background-color:#{{{bgcolor|efefff}}}; border:solid 1px #{{{border|9f9fff}}}; width: 80%;text-align:{{{justification|center}}};margin:auto;">{{#if: {{{image_name|}}} |
| style="padding:0 1em 0 1em;text-align:right;" |<div style="padding:.5em; background-color:#{{{bgcolor|efefff}}}; border:solid 1px #{{{border|9f9fff}}};text-align:{{{justification|center}}};margin:auto; {{ #if:{{{min-height|}}}| min-height:{{{min-height}}};|}}">{{#if: {{{image_name|}}} |
[[Image:{{{image_name|}}}|left{{ #if: {{{image_width|}}}|{{!}}{{{image_width|}}}px|}}{{ #if: {{{mouseover|}}} |{{!}}{{{mouseover|}}}|}}]] | }}
[[Image:{{{image_name|}}}|left{{ #if: {{{image_width|}}}|{{!}}{{{image_width|}}}px|}}{{ #if: {{{mouseover|}}} |{{!}}{{{mouseover|}}}|}}]] | }}
{{ #if: {{{header|}}} |<span style="font-size:125%;font-weight:900;">{{{header|}}}</span><hr/>|}}
{{ #if: {{{header|}}} |<span style="font-size:125%;font-weight:900;">{{{header|}}}</span><hr/>|}}
{{{message_text|Your message text goes here.  Generally speaking, you should have more than 1 line of text in order to force the thing to lay out correctly.}}}
{{{message_text|Your message text goes here.  Generally speaking, you should have more than 1 line of text in order to force the thing to lay out correctly.}}}
{{ #if: {{{talkpage|}}}|<br/><small>{{{talkpage|}}} [[:{{NAMESPACE}} talk:{{PAGENAME}}{{!}}talk page]].</small>|}}
{{ #if: {{{talkpage|}}}|<small>{{ #if: {{{talkSameLine|}}}| &nbsp;|<br/>}}{{{talkpage|}}} [[:{{TALKPAGENAME}}{{!}}talk page]].</small>|}}
</div>{{#if: {{{bottomtext|}}}|<small>{{{bottomtext|}}}</small>|}}
</div>{{#if: {{{bottomtext|}}}|<small>{{{bottomtext|}}}</small>|}}
|}
|}
</center>{{{categories|}}}</includeonly><noinclude>
</center>{{#ifeq: {{NAMESPACE}}||{{{categories|}}}}}{{#ifeq: {{NAMESPACE}}|File|{{{categories|}}}}}</includeonly><noinclude> {{doc}}
 
{{Messagebox}}
 


[[Category:Templates]]</noinclude>
[[Category:Meta templates]]</noinclude>

Latest revision as of 01:51, 23 June 2022

(Transcluded documentation: view)
{{Messagebox|
|message_text=
|header=
|image_name=
|talkpage=
|categories=
|mouseover=
|image_width=
|border=
|bgcolor=
|justification=
|talkSameLine=
|clearall=
|print=true
}}

Your message text goes here. Generally speaking, you should have more than 1 line of text in order to force the thing to lay out correctly.


There is an additional parameter 'bottomtext' that should really never be used unless you know what you're doing, because its presence is often conditional; it's used for clarifying something.

If you do need to use it, the format usually looks something like this; |bottomtext={{#if: {{{pending|}}}|<b>Decision Pending:</b> {{{pending|}}} |}}

Printing

By default, this template will not appear when the page is printed. To force it to appear set print=true.