Toggle menu
209
926
189
6.3K
Dovedale Railway Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Discord Forms Guidelines Rules Staff FAQ Policies & Terms

Introduction

The Dovedale Railway Wiki uses Semantic MediaWiki (often abbreviated as SMW) to store and query data about articles. In the following, the usage of the extension in the wiki is documented and explained.

Core Concepts

Please refer to the official manual and the introduction pdf to learn about the core concepts of Semantic MediaWiki.

Creating Properties

To create a property, create a new page in the Property namespace.

Property names

Property names are usually written in singular form and in Title case.

Property types

You can find the full list of available datatypes here: List of datatypes

The following datatypes are primarily used in the wiki:

Type Usage Example Documentation
Boolean True/False and Yes/No values Dispatching Type Boolean
Date Dates Start Date Type Date
Number Amounts without units Doors, Distant Signals Controlled Type Number
Page References to other articles Closest Station, Crossings Controlled Type Page
Quantity Quantities with units Top Speed, Acceleration Type Quantity
Text Text, wikitext, links, special formats Status Description, Abbreviation Type Text

Property Documentation

The wiki uses various meta properties to document other properties. These should be set using in-text annotations on the property's page.

Meta Properties
Name Usage Example Required
Has type Defines the type of a property. [[Has type::Text]] Yes
Property description Describes the function and usage of a property. Note: The value must end with @en due to technical reasons. [[Property description::The total number of coaches a train has.@en]] Yes
Parameter Name The name of the infobox template parameter that has to be specified in order to declare the property for an article. [[Parameter Name::status_description]]] For all properties that are used in Infoboxes.
Example Value An example value of the property. Note: Currently, only one example value is supported per property. [[Example Value::yes]]] Yes
Allows value The value a property is allowed to take. This meta property should be set multiple times to allow multiple values. Please note that, if this is specified, setting the property to any other value will result in a processing error. [[Allows value::Automatic half barrier]]] No
Parameter Required Whether the infobox template parameter for the property is required. This should either be set to true or left unset. [[Parameter Required::true]]] No

The values of meta properties are used for the automatic generation of TemplateData by Module:TemplateDataGenerator.

Special values

To set meta properties, you should in general use in-text annotations. In case this does not work for the value you want to set, like e.g. links, use the SetAndDisplayProperty template:

{{SetAndDisplayProperty|Example Value|[[Satus Services]]}}

This template both executes the #set parser function and displays the submitted value.

Example

The following code creates the Distant Signals Controlled property of type Number.

* Type: [[Has type::Number]]
* [[Property description::The amount of distant signals which a signal box controls.@en]]
* Parameter Name: [[Parameter Name::distant_signals_controlled]]
* Example: [[Example Value::2]]

Storing Data

There are various ways of storing data using Semantic MediaWiki. Apart from property pages, all wiki articles currently use infoboxes to store SMW data.

Infoboxes

When using Template:Infobox and Module:Infobox, the provided SMW properties will be automatically set. For each property, its value of the meta property Parameter Name is retrieved and used to get the value from the parameters.

In-text annotations

Documentation

In-text annotations are currently only used to set meta properties on property pages. To use them, simply use the following syntax: [[Property Name::Value]]. This will both set the property to a value and print the value out.

For incompatible values, please see special values.

Parser function

Documentation

The #set parser function can be used to set data without printing it out.

Querying Data

SMW Data is currently used for the following wiki features:

Within articles

Official Documentation

Special:Ask can be used to generate a query using the #ask parser function.

In modules

To query data from within a module, you can use the SMWUtil module.

On special pages

The special pages Special:Ask and Special:Browse can be used to browse SMW data.

In infoboxes

When using Template:Infobox or Module:Infobox, the printout[number] parameter can be used to show a printout of the property value instead of the provided value. Please note that when using this, values are only updated after the page was refreshed once since SMW takes the value from the previous version of the page while parsing a new version. Updated values will therefore not be visible in the editing preview.

🍪 Yum Yum Yum! Cookies help us better deliver our services. By using our site, you agree to our use of cookies.