m 1 revision imported |
No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<bookshelf src="Book:Getting started with Semantic MediaWiki" /> | |||
==Scope and terminology== | ==Scope and terminology== | ||
Semantic MediaWiki (SMW) is a MediaWiki | Semantic MediaWiki (SMW) is a set of MediaWiki extensions that make it possible to collect and query structured data in the wiki. Properties can be added to any wiki page, for example the document owner (Property:Has document owner) or an expiration date (Property:Has expiration date). | ||
The following steps are usually | The following steps are usually necessary to work with data-based content in your wiki : | ||
#'''Define properties:''' Properties determine which values can be queried in the wiki. | #'''Define properties:''' Properties determine which values can be queried in the wiki. | ||
#'''Create a template:''' This creates the output format of the data set on the wiki pages. | #'''Create a template:''' This creates the output format of the data set on the wiki pages. | ||
#'''Create a form:''' Using this form, Wiki users can comfortably enter their data. | #'''Create a form:''' Using this form, Wiki users can comfortably enter their data. | ||
#'''Assign a category:''' Each page that contains a semantic | #'''Assign a category:''' Each page that contains a semantic template is usually tagged with a category that was created for this purpose. This, in addition to the properties, provides an important means of querying and filtering the pages. | ||
<br /><gallery widths="380" heights="360"> | <br /><gallery widths="380" heights="360"> | ||
Line 18: | Line 18: | ||
==Define properties== | ==Define properties== | ||
To make information available as data on a wiki page, we create so-called '''properties'''. For example, if we want to semantically record customer data, we create a wiki page for each customer. We collect customer data such as location on every customer page. To do this, we create a property that records the location of the customer | To make information available as data on a wiki page, we create so-called '''properties'''. For example, if we want to semantically record customer data, we create a wiki page for each customer. We collect customer data such as location on every customer page. To do this, we create a property that records the location of the customer: | ||
<nowiki>[[Has location::Regensburg]]</nowiki> | <nowiki>[[Has location::Regensburg]]</nowiki> | ||
Afterwards | Afterwards, we can list all customers at a certain location or all customers with their individual locations in the wiki.<br /> | ||
==Create a template== | ==Create a template== | ||
Since we often want to display several such properties and their values on one page at the same time, we format a special area that clearly shows the | Since we often want to display several such properties and their values on one page at the same time, we format a special area that clearly shows the values for each property. This requires a (data) template, which can then be used on any wiki page. | ||
<br /> | <br /> | ||
Line 30: | Line 30: | ||
==Create a form== | ==Create a form== | ||
To support our users with data entry tasks, we create an input form. The input form is shown when users switch to the edit mode of a wiki page that has the | To support our users with data entry tasks, we create an input form. The input form is shown when users switch to the edit mode of a wiki page that has the data template included.<br />[[File:screenshot-Formular-EN.png|alt=Data entry form|center|thumb|500x500px|Data entry form]] | ||
<br /> | <br /> | ||
==Assign a category== | ==Assign a category== | ||
Wiki pages that use | Wiki pages that use data templates are tagged with a category. This category enables the assignment of the input form to the wiki page. The category is also used to query the data collected by the template. The data can then be displayed anywhere in the wiki.<br /> | ||
==Example== | ==Example== | ||
On the following pages, we | On the following pages, we create an example that collects and displays customer data it in the wiki. | ||
Latest revision as of 07:46, 16 July 2025
Scope and terminology
Semantic MediaWiki (SMW) is a set of MediaWiki extensions that make it possible to collect and query structured data in the wiki. Properties can be added to any wiki page, for example the document owner (Property:Has document owner) or an expiration date (Property:Has expiration date).
The following steps are usually necessary to work with data-based content in your wiki :
- Define properties: Properties determine which values can be queried in the wiki.
- Create a template: This creates the output format of the data set on the wiki pages.
- Create a form: Using this form, Wiki users can comfortably enter their data.
- Assign a category: Each page that contains a semantic template is usually tagged with a category that was created for this purpose. This, in addition to the properties, provides an important means of querying and filtering the pages.
-
Semantic properties
-
Semantic template
-
Data entry form
-
Category to organize data
Define properties
To make information available as data on a wiki page, we create so-called properties. For example, if we want to semantically record customer data, we create a wiki page for each customer. We collect customer data such as location on every customer page. To do this, we create a property that records the location of the customer:
[[Has location::Regensburg]]
Afterwards, we can list all customers at a certain location or all customers with their individual locations in the wiki.
Create a template
Since we often want to display several such properties and their values on one page at the same time, we format a special area that clearly shows the values for each property. This requires a (data) template, which can then be used on any wiki page.

Create a form
To support our users with data entry tasks, we create an input form. The input form is shown when users switch to the edit mode of a wiki page that has the data template included.

Assign a category
Wiki pages that use data templates are tagged with a category. This category enables the assignment of the input form to the wiki page. The category is also used to query the data collected by the template. The data can then be displayed anywhere in the wiki.
Example
On the following pages, we create an example that collects and displays customer data it in the wiki.
Example: Collect customer data