Semantic MediaWiki properties creation - Tutorial 11
Based on Semantic MediaWiki's video on YouTube. If you like this content, support the original creators by watching, liking and subscribing to their content.
Semantic MediaWiki defaults untyped properties to type Page, turning each distinct value into a separate page.
Briefing
Semantic MediaWiki properties default to creating a separate page for every value unless a property is given a specific data type. That behavior quickly becomes messy—for example, a “club established” value like 1886 would turn into its own page—so the practical fix is to assign the right type to each property (and, when needed, restrict which values are allowed).
The tutorial starts with an existing set of properties for Arsenal Football Club, such as “town has country” and “club established.” When those properties are created purely via MediaWiki markup, each distinct value (like “London” or “England”) becomes a page automatically. The presenter notes that this is often undesirable: some values should be treated as dates or numbers rather than standalone pages. Semantic MediaWiki provides 17 property data types, including Page (the default), Date, Email, Text, URL, Telephone, and Number. Assigning a type makes the wiki interpret the value correctly and changes how it appears in property browsing.
To set types manually, the workflow uses property syntax that includes “has type” followed by the chosen data type. For instance, “has type page” makes it explicit that a property’s values should be treated as pages (useful for things like “town” where “London” should remain a page). For “club established,” the tutorial switches from the default page type to “has type date,” so the value “1886” is treated as a date rather than a page. After saving, the page refresh shows which properties have turned blue (typed) and which remain untyped.
The tutorial then demonstrates a simpler, form-based approach for defining properties and restricting allowed values. Using Special:CreateProperty (via the “Create a property” area), the user selects a data type and can constrain the value set by entering allowed options separated by commas. A “league” property is configured with a fixed list (e.g., “Premier League Division 1 Division 2 Division 3”), which triggers validation: if a user later tries to save “Division four,” Semantic MediaWiki rejects it and shows an error indicator.
A key lesson follows: consistency matters. The allowed values are case-sensitive, so creating a property with a different capitalization (e.g., “has league” vs “has Leek”) creates a separate, unintended property and breaks the restriction logic. Once the property name and capitalization are corrected, the allowed values behave as expected.
Finally, the tutorial shows the payoff of typing: after defining a property as “number,” the value “13” is no longer treated as a page and becomes non-linkable in the way page-typed values are. Semantic MediaWiki also aggregates results across the wiki: wherever that typed property appears, it collects the pages and values into a unified property view (including a separate “titles” page listing all pages that use the property).
Cornell Notes
Semantic MediaWiki turns each property value into its own page by default, which can be wrong for dates and numbers. The solution is to assign a data type to each property using “has type” (or the Special:CreateProperty form). For example, “town” can be explicitly set to type page, while “club established” should be type date so “1886” behaves like a date instead of a page. When a property should only accept specific options, allowed values can be restricted by entering a comma-separated list in Special:CreateProperty. Consistent property naming and capitalization are crucial because mismatches create separate properties and break validation.
Why do property values become pages in Semantic MediaWiki, and how does typing change that behavior?
How is a property manually typed, and what’s the practical difference between “page” and “date” types?
What is the easiest way to restrict allowed values for a property?
What goes wrong when property names or capitalization are inconsistent?
How does typing affect whether values are linkable and how results are aggregated?
Review Questions
- When would you choose “has type page” instead of “has type date” for a property, and what user-facing effect would you expect?
- How does Semantic MediaWiki enforce allowed values for a property, and what format is used to enter them in Special:CreateProperty?
- Why can a capitalization mistake in a property name (e.g., “has league” vs “has Leek”) break validation and create confusing results?
Key Points
- 1
Semantic MediaWiki defaults untyped properties to type Page, turning each distinct value into a separate page.
- 2
Assign the correct data type (e.g., Date or Number) to prevent values like “1886” or “13” from becoming unwanted pages.
- 3
Use “has type” syntax for manual typing, or Special:CreateProperty for a guided setup.
- 4
Restrict allowed values by entering a comma-separated list of permitted options in Special:CreateProperty.
- 5
Allowed-value validation fails if the property name is inconsistent or capitalization differs, because it creates a different property.
- 6
Typed properties update the property browser (typed properties turn blue) and change whether values are linkable.
- 7
Semantic MediaWiki aggregates pages that use a property into a unified property view, including typed values across the wiki.