Replace list of pages in a Category by a semantic query

Semantic extension(s): Semantic MediaWiki
Further extension(s):  -/-
Keyword(s):  -/-



Semantic Media Wiki (like Mediawiki) simply displays Category pages as a list of pages, in alphabetical order.

Depending on the type of page in your category, it could make more sense to replace that list with something more appropriate, such as :

  • A Google Map if your category is about locations
  • A Timeline if your category is about events
  • A list of Open requests if your category is about requests
  • and so on...

Solution 1[edit]


  • You are using the CSS extension


The trick is to simply hide the page element containing the list of pages and replace it with your query.

1- Install the CSS extension if you don't have it yet, or ad

2- Create a new template : Template:HIDE_CATEGORY_PAGES

<noinclude>This template is meant to be used in Category pages to hide the default list of pages.</noinclude>
/* #mw-subcategories {display: none} */
#mw-pages {display: none}

2- Open your category page ( for example : Category:Events )

3- Add the following line to hide the default list of pages :


4- Add your query. For example, to display a timeline and list of recent events :

|?Has start date = start
|?Has end date = end
|sort=Has start date

|?Has start date = start
|?Has end date = end
|sort=Has start date

Solution 2[edit]

This solution is ideal if you have only a few category pages requiring this replacement.

1- Put this into your Common.css (using Category:Events as an example): #mw-subcategories {display: none} #mw-pages {display: none}

2- Continue from step 4 above.

Solution 3[edit]

Install Extension:CategoryMagicWords to hide the pages output completely. Add you query directly or through a template to the category pages.