Template:Infobox U.S. state

From Linux Web Expert

Revision as of 04:33, 17 March 2018 by imported>Kghbln (Change "Area" to "Has area")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This is a greatly simplified adaptation of the template from wikipedia:Template:Infobox U.S. state.

This version embeds semantic annotation inside the template, so the template both displays information in a table and records semantically meaningful properties. Such semantic templates simplify adding semantics to recurring elements in wiki pages.

Note this table does not handle missing values for Population and Area. That can be done using {{#if:}} from the MediaWiki ParserFunctions extension, but using conditionals in a table requires tricky syntax to mix pipe ' | ' symbols for layout and expressions (see wikipedia:Wikipedia:Conditional_tables).

The table appears below in this template page (we could hide it with <includeonly>). You don't see any factbox for this dummy table because in this Semantic MediaWiki installation, semantic annotations are not enabled in the Template namespace.

{{{Name}}}
Population {{{Pop}}}
Area {{{Area}}} sq mi