Template:MessageBox: Difference between revisions
OtherXAdmin (talk | contribs) No edit summary |
OtherXAdmin (talk | contribs) No edit summary |
||
Line 64: | Line 64: | ||
<table class="messagebox {{{class|}}}" role="presentation" | <table class="messagebox {{{class|}}}" role="presentation" | ||
{{#if:{{{style|}}}|style="{{{style}}}"}}> | {{#if:{{{style|}}}|style="{{{style}}}"}}> | ||
<td class="messagebox-image" style="width: {{{imgwidth|50px}}};"> | <td class="messagebox-image" style="width: {{{imgwidth|50px}}};"> | ||
{{#if:{{{img|}}}|{{{img}}}|[[File:Tutor guide book detail.png|60x60px|center|link=]]}} | {{#if:{{{img|}}}|{{{img}}}|[[File:Tutor guide book detail.png|60x60px|center|link=]]}} | ||
Line 74: | Line 73: | ||
</td> | </td> | ||
{{#if:{{{imgright|}}}|<td class="messagebox-image messagebox-imageright" style="width: {{{imgrightwidth|50px}}};">{{{imgright}}}</td>}} | {{#if:{{{imgright|}}}|<td class="messagebox-image messagebox-imageright" style="width: {{{imgrightwidth|50px}}};">{{{imgright}}}</td>}} | ||
</table> | </table> | ||
</includeonly> | </includeonly> | ||
<noinclude>{{/doc}}</noinclude> | <noinclude>{{/doc}}</noinclude> |
Revision as of 14:00, 4 February 2024
The MessageBox template is a wrapper for all types of message boxes. This includes licenses, Maintenance templates, and general notices used to alert the reader about something.
Parameters
To use this template, copy the following code and fill in the necessary information
{{MessageBox |class = (optional) classes |img = Image |imgwidth = (optional) width of the table cell around the image |Tagline text |Extra information }}
The first parameter is mandatory, but all further parameters are optional. A plain message box will look like this: {{MessageBox|Example of a messagebox with no customisation}}
First parameter
The first parameter will give the tagline for the message box. This is the most eye-catching info in the box and should be short and sweet.
Second parameter
The second parameter specifies more information about the message, and can be used to specify some more details about what information is being conveyed.
img
Specify an image here. Recommended is to include center
, link=
and a file size, to stylize the image properly. Just specifying the file name will not work with this parameter; the image needs to be given as a complete file link.
imgwidth
The width of the cell the image is (must specify px
at the end), and defaults to 50px
. This effectively sets the margins around the image, if the image is smaller than 50 px. It is typically best to omit this parameter, but in cases where the image is larger setting a custom width may be helpful.
class
A class to give the messagebox. Typically this is used for messageboxes that use custom styling which is defined in a class.
style
Inline CSS to give to the messagebox.
Example
An example of a template that has almost all parameters specified is the Stub template
{{MessageBox |class = stub |img = [[File:Stub.png|Stub|center|50px|link=]] |This page is a [[RuneScape:Stubs|stub]]. |A stub is an article which does not cover all information available about the topic. You can help by [{{fullurl:{{FULLPAGENAME}}|action=edit}} expanding] it. }}
The MessageBox template is a wrapper for all types of message boxes. This includes licenses, Maintenance templates, and general notices used to alert the reader about something.
Parameters
To use this template, copy the following code and fill in the necessary information
{{MessageBox |class = (optional) classes |img = Image |imgwidth = (optional) width of the table cell around the image |Tagline text |Extra information }}
The first parameter is mandatory, but all further parameters are optional. A plain message box will look like this: {{MessageBox|Example of a messagebox with no customisation}}
First parameter
The first parameter will give the tagline for the message box. This is the most eye-catching info in the box and should be short and sweet.
Second parameter
The second parameter specifies more information about the message, and can be used to specify some more details about what information is being conveyed.
img
Specify an image here. Recommended is to include center
, link=
and a file size, to stylize the image properly. Just specifying the file name will not work with this parameter; the image needs to be given as a complete file link.
imgwidth
The width of the cell the image is (must specify px
at the end), and defaults to 50px
. This effectively sets the margins around the image, if the image is smaller than 50 px. It is typically best to omit this parameter, but in cases where the image is larger setting a custom width may be helpful.
class
A class to give the messagebox. Typically this is used for messageboxes that use custom styling which is defined in a class.
style
Inline CSS to give to the messagebox.
Example
An example of a template that has almost all parameters specified is the Stub template
{{MessageBox |class = stub |img = [[File:Stub.png|Stub|center|50px|link=]] |This page is a [[RuneScape:Stubs|stub]]. |A stub is an article which does not cover all information available about the topic. You can help by [{{fullurl:{{FULLPAGENAME}}|action=edit}} expanding] it. }}
The MessageBox template is a wrapper for all types of message boxes. This includes licenses, Maintenance templates, and general notices used to alert the reader about something.
Parameters
To use this template, copy the following code and fill in the necessary information
{{MessageBox |class = (optional) classes |img = Image |imgwidth = (optional) width of the table cell around the image |Tagline text |Extra information }}
The first parameter is mandatory, but all further parameters are optional. A plain message box will look like this: {{MessageBox|Example of a messagebox with no customisation}}
First parameter
The first parameter will give the tagline for the message box. This is the most eye-catching info in the box and should be short and sweet.
Second parameter
The second parameter specifies more information about the message, and can be used to specify some more details about what information is being conveyed.
img
Specify an image here. Recommended is to include center
, link=
and a file size, to stylize the image properly. Just specifying the file name will not work with this parameter; the image needs to be given as a complete file link.
imgwidth
The width of the cell the image is (must specify px
at the end), and defaults to 50px
. This effectively sets the margins around the image, if the image is smaller than 50 px. It is typically best to omit this parameter, but in cases where the image is larger setting a custom width may be helpful.
class
A class to give the messagebox. Typically this is used for messageboxes that use custom styling which is defined in a class.
style
Inline CSS to give to the messagebox.
Example
An example of a template that has almost all parameters specified is the Stub template
{{MessageBox |class = stub |img = [[File:Stub.png|Stub|center|50px|link=]] |This page is a [[RuneScape:Stubs|stub]]. |A stub is an article which does not cover all information available about the topic. You can help by [{{fullurl:{{FULLPAGENAME}}|action=edit}} expanding] it. }}
The MessageBox template is a wrapper for all types of message boxes. This includes licenses, Maintenance templates, and general notices used to alert the reader about something.
Parameters
To use this template, copy the following code and fill in the necessary information
{{MessageBox |class = (optional) classes |img = Image |imgwidth = (optional) width of the table cell around the image |Tagline text |Extra information }}
The first parameter is mandatory, but all further parameters are optional. A plain message box will look like this: {{MessageBox|Example of a messagebox with no customisation}}
First parameter
The first parameter will give the tagline for the message box. This is the most eye-catching info in the box and should be short and sweet.
Second parameter
The second parameter specifies more information about the message, and can be used to specify some more details about what information is being conveyed.
img
Specify an image here. Recommended is to include center
, link=
and a file size, to stylize the image properly. Just specifying the file name will not work with this parameter; the image needs to be given as a complete file link.
imgwidth
The width of the cell the image is (must specify px
at the end), and defaults to 50px
. This effectively sets the margins around the image, if the image is smaller than 50 px. It is typically best to omit this parameter, but in cases where the image is larger setting a custom width may be helpful.
class
A class to give the messagebox. Typically this is used for messageboxes that use custom styling which is defined in a class.
style
Inline CSS to give to the messagebox.
Example
An example of a template that has almost all parameters specified is the Stub template
{{MessageBox |class = stub |img = [[File:Stub.png|Stub|center|50px|link=]] |This page is a [[RuneScape:Stubs|stub]]. |A stub is an article which does not cover all information available about the topic. You can help by [{{fullurl:{{FULLPAGENAME}}|action=edit}} expanding] it. }}