Namespaces
Variants
Views

Template:ReferenceLink

From NAMA Database
Jump to: navigation, search

This template allows us to add a literature reference to either a wiki page (documenting the reference) or a URL directly to the site.

The reason this is needed is that we use Property:Reference to document references, and we can only specify a single data type for it. However, since we want to be able to accept both URLs and wiki pages, this means that we need to be able to accept two data types (URL and Page), which is not currently possible in SMW.

To get around this, we just make everything type URL, since as far as the semantic web is concerned, this is how everything works anyway.

If the value passed begins with http, it's a URL, otherwise it's a wiki page and has the relevant URL bits and anchorencoding done to it.

This is how to use it:

{{referenceLink|value=http://some.site.com}}
{{referenceLink|value=Page on my wiki}}