Difference between revisions of "Template:Infobox"

From MyFallen Gaming Community
Jump to navigation Jump to search
(Undo revision 272 by Eaglefrost (talk))
Tag: Undo
Line 1: Line 1:
<onlyinclude><infobox>
+
{{#invoke:Infobox|infobox}}<includeonly>{{template other|{{#ifeq:{{PAGENAME}}|Infobox||{{#ifeq:{{str left|{{SUBPAGENAME}}|7}}|Infobox|[[Category:Infobox templates|{{remove first word|{{SUBPAGENAME}}}}]]}}}}|}}</includeonly><noinclude>
<title source="title"><default>''Unknown''</default></title>
+
{{documentation}}
<image source="image"><caption source="imagecaption"/></image>
+
<!-- Categories go in the /doc subpage, and interwikis go in Wikidata. -->
<group>
+
</noinclude>
<header>Some attributes</header>
 
<data source="first"><label>First</label><default>''Unknown''</default></data>
 
<data source="second"><label>Second</label><default>''Unknown''</default></data>
 
<data source="third"><label>Third</label><default>''Unknown''</default></data>
 
</group>
 
<group>
 
<header>Other attributes</header>
 
<data source="fourth"><label>Fourth</label></data>
 
<data source="fifth"><label>Fifth</label></data>
 
<data source="sixth"><label>Sixth</label></data>
 
</group>
 
<group layout="horizontal">
 
<header>Order</header>
 
<data source="previous"><label>Previous</label></data>
 
<data source="next"><label>Next</label></data>
 
</group>
 
</infobox></onlyinclude><noinclude><br style="clear:both;"/>
 
{{documentation}}</noinclude>
 

Revision as of 19:29, 5 January 2020

50px Template documentation[view] [edit] [history] [purge]

Description

This template is a sample infobox, to aid in the creation of new infoboxes.

Recommended usage: copy the template code to a new template page, and edit it there.

Infobox and template background

See Help:Templates, Help:Infobox for some background on how templates and infoboxes work.

Notes

  • The Title, First, Second, and Third rows show "Unknown" if their values are not specified.
  • The Image, Imagecaption, Fourth, Fifth, and Sixth rows won't show up if their values are not specified.

Syntax

{{infobox
 | title         = 
 | image         = [e.g. "Example.jpg"]
 | imagecaption  = 
 | first         =
 | second        =
 | third         =
 | fourth        =
 | fifth         =
 | sixth         =
 | previous      =
 | next          =
}}

Samples

{{infobox
 | title         = A pretty flower
 | image         = Example.jpg
 | imagecaption  = Floweris flowerum
 | first         = Pink and green
 | second        = Outdoors
 | fourth        = Annual
 | previous      = I
 | next          = III
}}

Results in...

A pretty flower
Example.jpg