Difference between revisions of "InfoBoxSandbox"
(Added documentation box) |
m (Documentation) |
||
(20 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | <includeonly><div class="info-box-outer"><table class="info-box"><tr><th class="infobox-title" colspan="2">{{{title}}}</th>{{{infoBoxTable|}}}</tr></table></div></includeonly> | + | <includeonly> |
− | <noinclude>{{Documentation | + | <div class="info-box-outer"> |
− | | title = | + | <table class="info-box"> |
− | | introduction = | + | <tr> |
− | | usageContent = | + | <th class="infobox-title" colspan="2">{{{title}}}</th> |
− | | usageExample = | + | {{{infoBoxTable|}}} |
− | < | + | </tr> |
− | {{ | + | </table> |
− | | title | + | </div> |
− | | infoBoxTable | + | <!-- Do not seperate these tags! --> |
− | }} | + | </includeonly><noinclude>{{Documentation |
− | </ | + | | title = Infobox |
− | | usageResult = | + | | introduction = The infobox acts as the basis for all other infoboxes on this wiki. |
− | {{ | + | | 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). |
− | | title | + | | usageExample = |
− | | infoBoxTable | + | <pre>{{InfoBoxSandbox |
− | }} | + | | title=Test infobox |
− | | parameters | + | | 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 -->}}</pre> | ||
+ | | usageResult = {{InfoBoxSandbox | ||
+ | |title=Test infobox | ||
+ | |infoBoxTable= | ||
+ | <tr> | ||
+ | <td>Test stuff here</td> | ||
+ | <td>And here</td> | ||
+ | </tr> | ||
+ | }} | ||
+ | | parameters = <templatedata> | ||
+ | { | ||
"params": { | "params": { | ||
"title": { | "title": { | ||
Line 28: | Line 42: | ||
"infoBoxTable": { | "infoBoxTable": { | ||
"label": "Info box template", | "label": "Info box template", | ||
− | "description": "The template table to show in the infobox", | + | "description": "The template table content to show in the infobox. Any content in here needs to be wrapped in tr tags.", |
"type": "unbalanced-wikitext", | "type": "unbalanced-wikitext", | ||
"required": true | "required": true | ||
} | } | ||
}, | }, | ||
− | "description": " | + | "description": "Here are the parameters used for the infobox. These both show how the infobox will be displayed ", |
"format": "block" | "format": "block" | ||
} | } | ||
− | </templatedata> | + | </templatedata> |
− | }} | + | }}</noinclude> |
− | |||
− | </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
Parameter | Description | Type | Status | |
---|---|---|---|---|
Title | title | The title of the info box
| String | required |
Info box template | infoBoxTable | The template table content to show in the infobox. Any content in here needs to be wrapped in tr tags. | Unbalanced wikitext | required |