Help:Category format

Jump to: navigation, search
Category format
List in columns, with first letters as section headers, in the style of MediaWiki category pages
Available languages
Further Information
Provided by: Semantic MediaWiki
Added: 1.4.3
Removed: still supported
Requirements: none
Format name: category
Enabled by default: 
Indicates whether the result format is enabled by default upon installation of the respective extension.
Authors: David Loomer, Yaron Koren
Categories: misc
Table of Contents

↓ INFO ↓

The result format category is used to format query results in the manner of MediaWiki's category pages.

Semantic MediaWiki 2.2.0 brought several improvements to this result format:

  • It now adheres to the $wgCategoryCollation configuration setting meaning that the sorting of the pages will be done according to the collation set for the wiki.1
  • Also when adding the page's group headers the previously used "h3" element was replaced with a "div" element utilising the same CSS properties. Thus these headers do no longer interfere with generation or suppression of tables of content e.g. with the __TOC__ or __NOTOC__ behaviour switches.2
  • The "named args" parameter was introduced allowing e.g. to change formatting

NoteNote:  The page sorting behaviour of SMW and MW differ when it comes to pages containing the "defaultsort" magic word ({{DEFAULTSORT:sortkey}}) or not. When using this result format a page containing the mentioned magic word takes precedence when sorting before a page not containing it.3

Format specific parameters

Parameter Type Default Description
columns whole number 3 The number of columns in which to display results (default is $1)
delim text empty The delimiter
template text empty A template to format the items with
userparam text empty A parameter to pass to the template
named args yes/no no Name the arguments passed to the template
import-annotation yes/no no <smw-paramdesc-import-annotation>


 [[located in::Germany]] 
This produces the following output

This documentation page applies to all SMW versions from 1.4.3 to the most current version.
      Other languages: defrzh-hans

Help:Category format en 1.4.3