Special property "External formatter URI"

From semantic-mediawiki.org
External formatter URI
Declares an external URL with placeholders $1, $2
Further Information
Provided by: extension "Semantic MediaWiki "Allows to store and query data annotated to pages
Added: 2.5.0
Removed: still in use
Alias: has no alias
Optional: no
Visible: yes
Annotable: yes
Declarative: yes
Setting: not specified
Focus: not specified
In this wiki: Property:External formatter URI
Table of Contents

The External formatter URI property is a special property in Semantic MediaWiki with a built-in meaning: it holds the external URL with a place holder $1.1 This place holder $1 will be replaced during the annotation process with the value of the annotation to generate the external resource identifier. The respective value annotation must be of datatype "External identifier"Holds a value that associates it with with a external URI for formatting. It was introduced with Semantic MediaWiki 2.5.0Released on 14 March 2017 and compatible with MW 1.23.0 - 1.29.x. and extended with Semantic MediaWiki 3.1.0Released on 23 September 2019 and compatible with MW 1.31.0 - 1.33.x..

See the property page External formatter URI to see which pages use this special property on this wiki.


[[External formatter uri::https://www.example.org/$1]]


If you create a property called "Has Wikidata item ID" of datatype datatype "External identifier"Holds a value that associates it with with a external URI for formatting and specify an external formatter URI using this special property ([[External formatter uri::https://www.wikidata.org/entity/$1]]) when a value annotated to a page with e.g. [[Has Wikidata item ID::Q42406391]] will display the value "Q42406391" automatically linked to the respective Wikidata site entry like Q42406391.

Reusing interwiki prefixes[edit]

You can reuse an existing interwiki prefix with the fullurl parser function. For example:

[[External formatter uri::{{fullurl:wikipedia:$1}}]]

Multi parameters[edit]

An external canonical URL can have different parameters to represent different versions of the content as in case of Wikipedia. In order to pinpoint the version, an additional parameter is necessary. The syntax {...} supports those additional parameters.

For a property "wikipedia" with:

[[Has type::External identifier]] [[External formatter uri::https://en.wikipedia.org/w/index.php?title=$1&oldid=$2]]

You can annotate

[[wikipedia::Truid Aagesen{837787373}]]

Thus, {...} identifies aditional parameters to the external URI and SMW will create a link to:


You can also add a space in between "Truid Aagesen" and "{837787373}" for better readability.


  1. ^  Semantic MediaWiki: GitHub issue gh:smw:1708