Template:Messagebox: Difference between revisions

From No Man's Land - A Trigun Wiki
Jump to navigation Jump to search
(aha, THAT'S where the errant <br> was coming from)
No edit summary
Line 1: Line 1:
<includeonly><center>
<includeonly><table class="messagebox" style="{{{style|}}}">
{| cellspacing="0" style="{{ #if:{{{width|}}}| width:{{{width}}};|}}{{ #if:{{{clearall|}}}| clear: both;|}}" {{#ifeq:{{{print|false}}}|false|class="noprint"}}
<tr>
|-
{{#if:{{{image|}}}|<td class="messagebox-image">[[File:{{{image}}}|{{{imagewidth|55px}}}|link=|alt=]]</td>}}
| style="padding:0 1em 0 1em;text-align:right;" |<div style="padding:.5em; background-color:#{{{bgcolor|E5E4E2}}}; border:solid 1px #{{{border|E5E4E2}}};text-align:{{{justification|center}}};margin:auto; {{ #if:{{{min-height|}}}| min-height:{{{min-height}}};|}}">{{#if: {{{image_name|}}} |
<td class="messagebox-text" {{#if:{{{image|}}}{{{bottomtext|}}}||style="text-align:center"}}>{{{text|This is some text!}}}
[[Image:{{{image_name|}}}|left{{ #if: {{{image_width|}}}|{{!}}{{{image_width|}}}px|}}{{ #if: {{{mouseover|}}} |{{!}}{{{mouseover|}}}|}}]] | }}
{{#if:{{{bottomtext|}}}|<div class="messagebox-bottomtext">{{{bottomtext}}}</div>}}</td>
{{ #if: {{{header|}}} |<span style="font-size:125%;font-weight:900;">{{{header|}}}</span><hr/>|}}
</tr></table>{{#if:{{NAMESPACE}}|{{#ifeq:{{NAMESPACE}}|File|{{{categories|}}}}}|{{{categories|}}}}}</includeonly><noinclude>
{{{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|}}}|<small>{{ #if: {{{talkSameLine|}}}| &nbsp;|<br/>}}{{{talkpage|}}} [[:{{TALKPAGENAME}}{{!}}talk page]].</small>|}}
A base for making hatnote templates, like [[Template:Stub]].
</div>{{#if: {{{bottomtext|}}}|<small>{{{bottomtext|}}}</small>|}}
 
|}
;Syntax
</center>{{#ifeq: {{NAMESPACE}}||{{{categories|}}}}}{{#ifeq: {{NAMESPACE}}|File|{{{categories|}}}}}</includeonly><noinclude>
<pre>{{Messagebox
|image=
|imagewidth=
|text=
|bottomtext=
|categories=
}}</pre>
 
;Parameters
:'''image'''
:*Optional. Do not include <nowiki>[[File:]]</nowiki>, but do include filetype--e.g. <code>Example.png</code>.
:'''imagewidth'''
:*Optional. Defaults to 55px.
:'''text'''
:*''Required.'' The message's main text.
:'''bottomtext'''
:*Optional. Additional text that goes below the main text.
:'''categories'''
:*Optional, but recommended. Adds any specified categories to pages that the child template is added to. Format as a normal list of categories, e.g. <code><nowiki>[[Category:Example 1]][[Category:Example 2]]</nowiki></code>
[[Category:Templates]]
[[Category:Templates]]
</noinclude>
</noinclude>

Revision as of 17:41, 22 September 2023


A base for making hatnote templates, like Template:Stub.

Syntax
{{Messagebox
|image=
|imagewidth=
|text=
|bottomtext=
|categories=
}}
Parameters
image
  • Optional. Do not include [[File:]], but do include filetype--e.g. Example.png.
imagewidth
  • Optional. Defaults to 55px.
text
  • Required. The message's main text.
bottomtext
  • Optional. Additional text that goes below the main text.
categories
  • Optional, but recommended. Adds any specified categories to pages that the child template is added to. Format as a normal list of categories, e.g. [[Category:Example 1]][[Category:Example 2]]