Namespaces
Variants
Views

Template:ReferenceLinkSIO

From NAMA Database
Jump to: navigation, search
There are security restrictions on this page

See also Template:ReferenceLink. This template is similar although it has a slightly different implementation to support the use of references within Semantic Internal Objects

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:

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