Template:Infobox/doc

From The Ganoltir Project Wiki
Revision as of 21:33, 27 May 2017 by GROMkill (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Template:Note


Template documentation

This template is intended as a meta-template: a template used for constructing other templates. It is not meant for use directly in an article, but can be used on a one-off basis if required. for more info see wikipedia

Usage Example

Basic Usage example (for more practical example see Template:Infobox character):
{{Infobox 
| title   = Caption over top of the table.
| image   = your image
| label1  = Name 
| data1   = {{{name}}}
| label2  = Family Name
| data2   = {{{family name}}}

| header3 = Significant Dates
| label4  = Date of Birth
| data4   = {{{date of birth|}}}

| label5  = Date of Death
| data5   = {{{date of death}}}
}}
Caption over top of the table
File:No image.jpg
Name {{{name}}}
Family Name {{{family name}}}
Significant Dates
Date of Death {{{date of death}}}
  • Each row on the table can contain either a header#, or a label#/data# pair, or just a data# cell (where # is a numbers ranging from 1 to 40). These are mutually exclusive states so if you define a row with both a header and a label/data pair, the label/data pair is ignored.
  • Which means that you cannot define a label only row, thus to create optional fields, use {{{variable|}}} in the data# field, for example {{{date of birth|}}} as show above, this way if no value is given to 'date of birth' the row wont show, and if you want to make the field permanent that must be provided use the {{{variable}}} for example {{{date of death|}}} as show above.
  • To insert an image somewhere other than at the top of the infobox, provide full image syntax for example [[File:COA|200px]].
  • For Advanced options, CSS styling and HTML classes (which will make those tables look good) see the wikipedia documneation of the original template (Note: not all options have been ported and some adjustments has been made).


References

Template:EnWP