Template:Infobox/doc: Difference between revisions

From Songs of Syx Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
<div style="background: #34646f; border: 2px dashed #ffffff8c; padding: 5px">
{{documentation
<div class="docheader">Description</div>
|This template is essentially a table that contains information about an element of the game. More specifically, it's about the template on the page [[Template:Infobox]]. This infobox is commonly used for [[resources]] and some elements found in the game's word, such as [[trees]].
This template is essentially a table that contains information about an element of the game. More specifically, it's about the template on the page [[Template:Infobox]].
|To use this template, it must be placed ''before'' the main text of a page. It must start with <code>{{Infobox</code> and end with two curly brackets, <code>}}</code>. The infobox, by default, will be aligned to the right of the page, with the page's text tightly wrapping around it. This is because the infobox is a wikitable using the <code>float: left</code> CSS property. The infobox must be entered in the page with the proper format, which is shown here:
 
<span class="docheader">Use</span>
To use this template, it must be placed ''before'' the main text of a page. It must start with <code>{{Infobox</code> and end with two curly brackets, <code>}}</code>. The infobox, by default, will be aligned to the right of the page, with the page's text tightly wrapping around it. This is because the infobox is a wikitable using the <code>float: left</code> CSS property. The infobox must be entered in the page with the proper format, which is shown here:
<pre>
<pre>
{{Infobox
{{Infobox
Line 14: Line 11:
|is_for_building = Yes/No
|is_for_building = Yes/No
|spoil = #%
|spoil = #%
}}
}}</pre>
</pre>
|No example required, as the template's output is already seen.
 
}}<noinclude>[[Category:Doc_templates]]</noinclude>
Note that the above text is just an example, as this wiki will have different infoboxes and templates, will contain different values than what was shown. This can be seen by viewing the template under the "Edit source" or "View source" functions.
 
{| class="wikitable"
|-
! Parameter !! Value
|-
| title || Title or name of the main subject of the page/infobox.
|-
| caption || Optional caption of the image.
|-
| image || Image of the page's topic.
|-
| icon || Small icon of the resource.
|-
| cost || Trading cost of the resource.
|-
| is_for_building || If this resource is used for building.
|}
 
<!-- If you see this Bilka, I didn't copy you. I swear. -->
</div>

Latest revision as of 03:19, 22 November 2021

Template Documentation

Description

This template is essentially a table that contains information about an element of the game. More specifically, it's about the template on the page Template:Infobox. This infobox is commonly used for resources and some elements found in the game's word, such as trees.

Syntax

To use this template, it must be placed before the main text of a page. It must start with {{Infobox and end with two curly brackets, }}. The infobox, by default, will be aligned to the right of the page, with the page's text tightly wrapping around it. This is because the infobox is a wikitable using the float: left CSS property. The infobox must be entered in the page with the proper format, which is shown here:

{{Infobox
|title = Resource
|caption = Caption
|image = [[File:image.jpg]]
|icon = [[File:image.jpg]]
|cost = Low/Medium/High/etc.
|is_for_building = Yes/No
|spoil = #%
}}
Examples

No example required, as the template's output is already seen.