Familypedia
Advertisement
[edit] [purge] Template documentation

Purpose: Shows a single property in easier to read wikitext syntax. Text returned is intended for display and may have formatting or other transformations such as to the vernacular name in the local language. For dates, the illegal value of 9999 is treated as if the property was blank.

Compare with: {{Getfact}}- An alternative template intended for template writers examining values in the database. GetFact simply returns the value in the database and may be used for subsequent comparisons and other template processing. This is not so for {{Showfact}} values since they may have hidden formatting or have been transformed into a vernacular form.

Usage examples: On page Abraham Hunsberger (1786-1860) the following wikitext would produce these results.

Wikitext Result
{{showfact|birth county}} Bucks County, Pennsylvania
{{showfact|birth locality|if blank=unknown city}} unknown city
{{showfact|birth nation-subdiv1|intro=the state of |outro=,}} Pennsylvania,
Parameter Description
1 the property to query
page if omitted, results are returned for the current page. Otherwise the query is performed on the page specified.
if blank if the query does not return anything, then the text with the "if blank" parameter is returned instead.
link/intro/outro these parameters are the same as in the SMW documentation for inline queries.

Performance note: Semantic MediaWiki exploits the caching mechanism of mediawiki software. Since the article is in memory, queries on its properties have virtually no cost, so a page may use large numbers of these queries without making the page slower.

Advertisement