Replace list of pages in a Category by a semantic query

Problem
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...

Assumptions

 * You are using the CSS extension

Solution
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

This template is meant to be used in Category pages to hide the default list of pages.

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 :

Solution 2
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): body.page-Category_Events #mw-subcategories {display: none} body.page-Category_Events #mw-pages {display: none}

2- Continue from step 4 above.

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