Content Management
DRAFT - DRAFT - DRAFT
the objective of this page is to explain how the content of the wiki page could be structured using Semantic for Mediawiki (SMW) to build a scalable and object-based wiki (for search and relation-building aspects) and still keeping the freedom for authors to create their content. There needs to be a trade-off to be found between freedom and structure.
General principles and naming convention
SMW uses multiple notions. They are key to be used properly for good use.
Object | Usage | Naming Convention | Example |
---|---|---|---|
Page | the core component of the wiki and what readers are consuming. By default, there is no hierarchical structure of pages - and categories are the better way for structuring a wiki | each Word is start with a capital letter. Spaces and brackets are allowed. mutiple words are recommended to be separated by a space (mediawiki uses underscore instead of %20 for URL) | Nissan Leaf (2010-2017) |
Category | the categories are part of the generic Mediawiki structure. its reflects a categorization or labeling of pages. Categories can be nested which are useful to reflect a structure of "component of" and for "is a subtype of". Multiple categories can be assigned to page, hence it can provide multiple view at once. A dedicated section of this page will cover their aspects.
There are cases where it is not obvious whether a property or a category makes more sense. one does not prevent the other, by the way. |
UpperCamelCase | Battery
Connector |
Property | SMW specific - it defines a relation between 2 objects, or assign an attribute to an object. the target can be a list, another page | UpperCamelCase.DestinationObjectType or UpperCamelCase.DestinationAttributeType | FoundIn.Page
HasWeight.Qty |
Template | SMW specific - defines which properties shall be defined at the creation of an object. Not all pages must be created using templates, but objects which have relations between themselves are best created using templates. | the template name shall refer to a corresponding category name, and the template shall enforce that category at page creation.
T/UpperCamelCase.OutputFormat |
T/Connector.Infobox
T/Battery.Table |
Form | SMW specific - A Form is an helper for the author to create a templated object. The form allows to create a consistent visual structure to pages | F/UpperCamelCase - the Form refers to a corresponding Template, but the output format will not be referred to in the form name.
A form can also call multiple templates - in such case its name will refer to the first one |
F/Connector
F/Battery |
Why Semantic for Mediawiki?
SMW allows to create dynamic queries inside pages. The content will be modified based on other pages content. this is a powerful manner to make references to other pages without doing manual maintenance of the page. A practical example would be that if the query below was inserted a page creation (a template being called by a form), the page content will update itself to list all other pages that refer to this new page. {{#ask: [[Found in::{{PAGENAME}}]] | format=list | link=all }}