Get AI summaries of any video or article — Sign up free
Semantic MediaWiki properties creation - Tutorial 11 thumbnail

Semantic MediaWiki properties creation - Tutorial 11

Semantic MediaWiki·
5 min read

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.

TL;DR

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?

When properties are created without specifying a type, Semantic MediaWiki defaults the property’s data type to Page. That means each distinct value (like “London” or “England”) is treated as a page and becomes linkable. Assigning a different type—such as Date or Number—tells Semantic MediaWiki how to interpret the value, so it no longer behaves like a page. After saving typed properties, the property listings update (typed properties turn blue), and values like “1886” (date) or “13” (number) stop being treated as pages.

How is a property manually typed, and what’s the practical difference between “page” and “date” types?

Manual typing uses syntax that includes “has type” followed by the chosen data type. For example, setting “has type page” makes it explicit that values should be treated as pages (useful for a property like town where “London” should remain a page). Setting “has type date” for “club established” changes how “1886” is handled: it becomes a date value rather than a page. Refreshing the page after saving shows the typed property behavior in the property view.

What is the easiest way to restrict allowed values for a property?

Special:CreateProperty provides a form where the data type can be selected and allowed values can be entered as a comma-separated list. The tutorial configures a “league” property with a fixed set of divisions. After that, attempts to save a value not in the allowed list (e.g., “Division four”) triggers an error indicator, preventing invalid values from being stored.

What goes wrong when property names or capitalization are inconsistent?

The tutorial demonstrates a case-sensitivity/consistency failure: the restriction logic was applied to one property name (e.g., “has league”), but an incorrectly capitalized property name (e.g., “has Leek”) was created instead. As a result, the invalid property didn’t enforce the intended allowed values. Correcting the property name capitalization restores the restriction behavior and ensures the right property appears in “Browse properties.”

How does typing affect whether values are linkable and how results are aggregated?

Page-typed values are treated like pages and become linkable. Non-page types like Number make values non-linkable in the expected way. Even so, Semantic MediaWiki still aggregates across the wiki: a property view (and related “titles” page) collects all pages that use that property and lists the associated typed values.

Review Questions

  1. When would you choose “has type page” instead of “has type date” for a property, and what user-facing effect would you expect?
  2. How does Semantic MediaWiki enforce allowed values for a property, and what format is used to enter them in Special:CreateProperty?
  3. 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. 1

    Semantic MediaWiki defaults untyped properties to type Page, turning each distinct value into a separate page.

  2. 2

    Assign the correct data type (e.g., Date or Number) to prevent values like “1886” or “13” from becoming unwanted pages.

  3. 3

    Use “has type” syntax for manual typing, or Special:CreateProperty for a guided setup.

  4. 4

    Restrict allowed values by entering a comma-separated list of permitted options in Special:CreateProperty.

  5. 5

    Allowed-value validation fails if the property name is inconsistent or capitalization differs, because it creates a different property.

  6. 6

    Typed properties update the property browser (typed properties turn blue) and change whether values are linkable.

  7. 7

    Semantic MediaWiki aggregates pages that use a property into a unified property view, including typed values across the wiki.

Highlights

Untyped Semantic MediaWiki properties assume type Page, which can clutter a wiki by creating pages for every value.
Setting “has type date” turns “1886” into a date value rather than a page, while “has type number” makes “13” non-linkable.
Special:CreateProperty lets editors restrict values using a comma-separated allowed list, enforcing validation on later edits.
A capitalization mismatch in a property name can silently create a separate property and break the intended allowed-value rules.
Typing not only changes how values display, it also powers cross-wiki aggregation in property “titles” views.

Topics

  • Semantic MediaWiki Properties
  • Data Types
  • Special:CreateProperty
  • Allowed Values
  • Property Naming Consistency