Actions

Template

Difference between revisions of "InfoBoxSandbox"

m (Spacing)
m (Documentation)
 
(15 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<includeonly>
 
<includeonly>
<div class="info-box-outer">
+
    <div class="info-box-outer">
<table class="info-box">
+
        <table class="info-box">
<tr>
+
            <tr>
<th class="infobox-title" colspan="2">{{{title}}}</th>
+
                <th class="infobox-title" colspan="2">{{{title}}}</th>
{{{infoBoxTable|}}}
+
                {{{infoBoxTable|}}}
</tr>
+
            </tr>
</table>
+
        </table>
</div>
+
    </div>
</includeonly>
+
<!-- Do not seperate these tags! -->
<noinclude>
+
</includeonly><noinclude>{{Documentation
{{InfoBoxSandbox|title=Test infobox|infoBoxTable=<tr><td>Test stuff here</td><td>And here</td>}}
+
| title        = Infobox
This is some text
+
| introduction  = The infobox acts as the basis for all other infoboxes on this wiki.
<templatedata>
+
| usageContent  = To use this info box, you simply need to pass a title and some content. The content appears in a table so make sure to wrap whatever you have in a table row (tr tag).
{
+
| usageExample  =
"params": {
+
<pre>{{InfoBoxSandbox
"title": {
+
| title=Test infobox
"label": "Title",
+
| infoBoxTable=
"description": "The title of the info box",
+
    <tr>
"example": "Templar Order",
+
        <td>Test stuff here</td>
"type": "string",
+
        <td>And here</td>
"required": true
+
    </tr>
},
+
    <!-- You can use any other HTML Tags or any wikitext too, just wrap them in a tr -->}}</pre>
"infoBoxTable": {
+
| usageResult  = {{InfoBoxSandbox
"label": "Info box template",
+
    |title=Test infobox
"description": "The template table to show in the infobox",
+
    |infoBoxTable=
"type": "unbalanced-wikitext",
+
    <tr>
"required": true
+
        <td>Test stuff here</td>
}
+
        <td>And here</td>
}
+
    </tr>
 +
    }}
 +
| parameters = <templatedata>
 +
        {
 +
"params": {
 +
"title": {
 +
"label": "Title",
 +
"description": "The title of the info box",
 +
"example": "Templar Order",
 +
"type": "string",
 +
"required": true
 +
},
 +
"infoBoxTable": {
 +
"label": "Info box template",
 +
"description": "The template table content to show in the infobox. Any content in here needs to be wrapped in tr tags.",
 +
"type": "unbalanced-wikitext",
 +
"required": true
 
}
 
}
</templatedata>
+
},
</noinclude>
+
"description": "Here are the parameters used for the infobox. These both show how the infobox will be displayed ",
 +
"format": "block"
 +
}
 +
    </templatedata>
 +
}}</noinclude>

Latest revision as of 19:39, 29 November 2020

Infobox

The infobox acts as the basis for all other infoboxes on this wiki.

Usage:

To use this info box, you simply need to pass a title and some content. The content appears in a table so make sure to wrap whatever you have in a table row (tr tag).

{{InfoBoxSandbox
| title=Test infobox
| infoBoxTable=
    <tr>
        <td>Test stuff here</td>
        <td>And here</td>
    </tr>
    <!-- You can use any other HTML Tags or any wikitext too, just wrap them in a tr -->}}

The above would render the following:

Test infobox
Test stuff here And here

Parameters:

Here are the parameters used for the infobox. These both show how the infobox will be displayed

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Titletitle

The title of the info box

Example
Templar Order
Stringrequired
Info box templateinfoBoxTable

The template table content to show in the infobox. Any content in here needs to be wrapped in tr tags.

Unbalanced wikitextrequired