Changes

MyWikiBiz, Author Your Legacy — Friday May 31, 2024
Jump to navigationJump to search
Created page with '<noinclude>This is a greatly simplified adaptation of the template from [[wikipedia:{{FULLPAGENAME}}]]. This version embeds semantic annotation inside the template, so the templ…'
<noinclude>This is a greatly simplified adaptation of the template from [[wikipedia:{{FULLPAGENAME}}]].

This version embeds semantic annotation inside the template, so the template both displays information in a table and records semantically meaningful properties.
Such [[Help:Semantic templates|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 <tt><nowiki>{{#if:}}</nowiki></tt> 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 <nowiki><includeonly></nowiki>). 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.</noinclude>
{| style="border: 1px solid; width:25em; float: right; font-size: 90%;"
|-
|colspan="2" style="text-align: center;"| '''{{{Name}}}'''
|-
! [[Property:Population | Population]]
| [[Population::{{{Pop}}}]]
|-
! [[Property:Area | Area]]
| [[Area::{{{Area}}} sq mi]]
|}
<!-- now some annotations that don't appear in the template -->
<includeonly> [[Category:States of the United States]] [[Located in::United States of America| ]] </includeonly>
<noinclude> [[Category:Sample pages]] </noinclude>
299

edits

Navigation menu