Wikispooks:Semantic Templates

From Wikispooks
Revision as of 18:56, 4 January 2014 by Robin (talk | contribs) (fix links)
Jump to navigation Jump to search
SMW.png

Although semantic properties can be added inline in text, this is cumbersome and unsystematic so should be used only for testing purposes. All the SMW data on Wikispooks pages is input through templates.

Object Orientation

The templates are structured around a set of objects. Each object its own set of semantic properties and accompanying template to mark process them. Some are displayed to the user, some are not. As of January 2014, the objects as currently defined, in order of completion are:

  1. Documents - The first object defined on Wikispooks, with a functional Template and form
  2. Websites - Fairly simple, but fully functional template, no form as yet
  3. Properties - See Category:Properties for the full set, a short and sweet template, currently no form
  4. Events - Less functional, less consistent, no form
  5. Persons - Even less functional, even less consistent, no form
  6. Groups - Template currently just in planning, no form

Syntax

A 'semantic template' is just a template which uses semantic mediawiki, whether for reading or writing properties. The basic parser directives you'll need are:

A helpful summary of syntax is the quick reference guide, available here.

Multiple Values for Fields

Some parameters can take multiple values (e.g. an article can have more than one author). The previous approach to this was to have a set of numbered parameters, e.g Author, Author2, Author3 etc. This is cumbersome and was implemented in a hurry. A better approach is under development which inputs the data as separate items in a list, either comma-separated or slash(/)-separated. Some templates list both possibilities. If you are inputting data and have a choice, avoid the older, numbered parameters, using the list parameters instead. If you are coding, check out the '#arraymap:' and '#arraymaptemplate:' parser instructions and code accordingly.

Dates

Dates should be input as a single field, although some legacy code has separate fields for years, months & days. There are issues regarding data input and missing data items, but SMW is pretty good with date processing and a single field is the preferred option.

See Also

Wikispooks logo.png Policy.png Wikispooks to do.png Tools2.png SMW.png
Semantic
Mediawiki
Help.png