Difference between revisions of "Template:Message2"

From BattleMaster Wiki
Jump to navigation Jump to search
m
m (Reverted edits by V'Orlan (talk) to last revision by AbstractLogic)
Tag: Rollback
 
(25 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<includeonly>
+
<includeonly><table border="0" cellspacing="0" cellpadding="2" style="width: {{{Width|100%}}}; margin: 1px 1px 1px 1px; border-right: 2px solid #A9A9A9; border-left: 2px solid #A9A9A9; border-bottom: 2px solid #A9A9A9; border-top: 2px solid #A9A9A9; background-color: #F9F9F9">
<table border="0" cellspacing="0" cellpadding="2" style="width: 100%; float: left; margin: 1px 1px 1px 1px; border-right: 2px solid #A9A9A9; border-left: 2px solid #A9A9A9; border-bottom: 2px solid #A9A9A9; border-top: 2px solid #A9A9A9; background-color: #F9F9F9">
 
 
<tr>
 
<tr>
<td bgcolor="{{{Colour}}}" style="font-size: larger; font-weight: bold; padding-left: 1%;">{{{Type}}} from {{{Sender}}}</td>
+
<td bgcolor="{{Message2/{{{Type}}}}}" style="font-size: larger; font-weight: bold; padding-left: 1%;">{{c|white|{{{Type}}}{{#if:{{{Sender|}}} | &nbsp;from {{{Sender}}}|}}}}</td>
 
</tr>
 
</tr>
<tr>
+
{{#if: {{{Recipients|}}} | <tr><td bgcolor="{{Message2/{{{Type}}}}}" style="font-size: smaller; padding-left: 1%">{{c|white|Message sent to {{{Recipients}}}}}</td></tr>|}}
<td bgcolor="{{{Colour}}}" style="font-size: smaller; border-bottom: 1px solid #A9A9A9; padding-left: 1%">{{{Recipients}}}</td>
+
<tr><td colspan=2 style="padding-left: 1%; padding-right: 1%; border-top: 1px solid #A9A9A9;">{{{Content}}}</td></tr>
</tr>
+
{{#if: {{{Sender|}}} | <tr><td colspan=2 style="padding-left: 1%; padding-right: 1%;">{{{Sender}}} {{#if: {{{Title|}}} | ({{{Title}}})|}}</td></tr>|}}
<tr><td colspan=2 style="padding-left: 1%;">{{{Content}}}</td></tr>
+
</table></includeonly>
<tr><td colspan=2 style="padding-left: 1%;">{{{Sender}}} ({{{Title}}})</td></tr>
+
<noinclude>{{Documentation}}
</table>
+
[[Category:Utility Templates|{{PAGENAME}}]]</noinclude>
</includeonly>
 
<noinclude>
 
__NOTOC__
 
===Usage:===
 
<pre>
 
{{Message2
 
|Type=
 
|Sender=
 
|Recipients=
 
|Content=
 
|Title=
 
}}</pre>
 
 
 
===Parameters===
 
* '''Type:''' Letter, Roleplay, Report, Request, Orders, Important Orders, Out-of-Character.
 
* '''Sender:''' Who the message is from.
 
* '''Recipients:''' Who the message is addressed to.
 
* '''Content:''' The message body.
 
* '''Title:''' The message signature.
 
 
 
===Example===
 
{{Message2
 
|Type=Orders
 
|Sender=Jean-Olivier
 
|Recipients=All of his Vassals
 
|Content=Every male noble of my duchy will now wear a kilt in the duchie's tartan.
 
|Title=Emperor of Beluaterra
 
}}
 
 
 
</noinclude>
 

Latest revision as of 04:19, 2 December 2019

Template-info.svg Template Documentation
This documentation is transcluded from Template:Message2/doc.

ExamplesSandbox

Intro

This template is designed to allow the easy inclusion of IG style messages on the wiki in an easy-to-read format.

Usage

{{Message2
|Width=
|Type=
|Sender=
|Recipients=
|Content=
|Title=
}}

Parameters

  • Width: The width of the message box on the page. Please use percentage (e.g. 50%.) Default is 100%. Optional.
  • Type: Event, Letter, Roleplay, Report, Request, Orders, Important Orders, Out-of-Character. Required.
  • Sender: Who the message is from. Optional.
  • Recipients: Who the message is addressed to. Optional.
  • Content: The message body. Required.
  • Title: The message signature. Optional.

Subpages

This is for editing the template itself, not using it: