stackunderflow
stackunderflow

Reputation: 39

How to list pages next to categories?

I would like to build a small personal wiki with some kind of fast and easy tagging for each page.

My approach was to use categories as tags. On my main page I would like to list all categories and their corresponding pages next to them. In addition I want to list all pages which do not have any tags (categories) assigned to. Example:

Categorie A
Page_A1 Page_A2 Page_A3 ...

Categorie B
Page_B1 Page_B2 Page_B3 ...

...

Uncategorized
Page_1 Page_2 ...

I am looking for a solution where I dont have to explicitly specify each category.

Upvotes: 0

Views: 288

Answers (1)

Alexander Mashin
Alexander Mashin

Reputation: 4602

Use Category Tree extension (add wfLoadExtension( 'CategoryTree' ); to your LocalSettings.php, the extension is bundled with MediaWiki).

Then insert in your wikitext <categorytree mode="pages" class="categories">All</categorytree>. You can customise its appearance with CSS in MediaWiki:Common.css: .categories { /* Your CSS */}.

This example assumes that the categories that you want to show belong to some root category, in this case, Category:All.

Upvotes: 1

Related Questions