Difference between revisions of "Template:Infobox"

From Heathen's Gap Wiki
m (OceanDatrel moved page Template:Character infobox to Template:Infobox: more accurate naming)
 
(33 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>  
<noinclude>
<!-- Text starting with lt!-- and ending with --gt is a comment that will be not show.
[[Category:Site Structure]]
    Text between the noinclude tags is the documentation for your template and will not be transcluded with your template. -->
The following will initialise a blank player character infobox, as shown on the right, and add the page to the [[:Category:Player Characters|Player Characters]] category:


Look at this in source or edit view to really see how it is set up. See page [[SampleInfoboxUser]] for an example of how to use it.
<pre>
 
{{Infobox
This template just demonstrates a really simple infobox that will show up at the right top of where the template is used. It is really just a [https://www.mediawiki.org/wiki/Help:Templates mediawiki template] that generates a right floating [https://www.mediawiki.org/wiki/Help:Tables mediawiki table].
|Name =
 
|Image =
==Template Use==
|Quote =
To use this template, put the following text on a page, replacing the values as instructed.
|Class =
<!-- the following is just an explanation how to use this. The template would work without it, but it makes it easier for people to use a template.
|Heritage =
    The <pre> tells mediawiki to ignore the mediawiki markup so it doesn't actually call the template. -->
|Alignment =
<pre>{{SampleInfobox
|Player =
| firstValue = replace this with first value
|Gender =
| secondValue = replace this with second value
|Age(DOB) =
}}
}}
</pre>
</pre>


[[Category:External Sample]]
{|class="wikitable" border="1" style="float:right"
---- <!-- this draws a line to show where the template description ends and the template itself starts. The template would work without it. -->
|style="text-align: center" colspan="2" |
|-
|colspan="2" |
|-
|style="text-align: center" colspan="2" |''""''
|-
|'''Class:'''
|
|-
|'''Heritage:'''
|
|-
|'''Gender:'''
|
|-
|'''DOB/Age:'''
|
|-
|'''Alignment:'''
|
|-
|'''Player:'''
|
|-
|}
</noinclude>


 
<includeonly>
 
[[Category:Player Characters]]
</noinclude><!-- this is just a mediawiki table, see https://www.mediawiki.org/wiki/Help:Tables for more -->
{|class="wikitable" border="1" style="float:right"
{| class="wikitable" border="1" style="float:right; width:33%" <!-- float puts it on right side and wraps text -->
|style="text-align: center" colspan="2" | '''{{{Name}}}'''
|style="text-align: center" <!-- center the text --> colspan="2" <!-- make title row span across columns --> | Sample Infobox
|-
|colspan="2" | {{{Image}}}
|-
|style="text-align: center" colspan="2" | ''"{{{Quote}}}"''
|-
|'''Class:'''
|{{{Class}}}
|-
|'''Heritage:'''
|{{{Heritage}}}
|-
|'''Gender:'''
|{{{Gender}}}
|-
|'''DOB/Age:'''
|{{{Age(DOB)}}}
|-
|'''Alignment:'''
|{{{Alignment}}}
|-
|-
| style="background:silver; color:arsenic; width:25%" align="right"| '''first value: '''
|'''Player:'''
| {{{firstValue}}} <!-- this accesses the named parameter passed to the template, see https://www.mediawiki.org/wiki/Help:Templates -->
|{{{Player}}}
|-
|-
| style="background:silver; color:arsenic" align="right"| '''second value: '''
| {{{secondValue}}}
|}
|}
</includeonly>

Latest revision as of 10:39, 31 July 2022

The following will initialise a blank player character infobox, as shown on the right, and add the page to the Player Characters category:

{{Infobox
|Name = 
|Image =
|Quote =
|Class =
|Heritage =
|Alignment =
|Player =
|Gender =
|Age(DOB) =
}}
""
Class:
Heritage:
Gender:
DOB/Age:
Alignment:
Player: