How to show all categories in MediaWiki Main or other pages?
Asked Answered
R

1

7

I want to display all the categories in main page or any other page in MediaWiki just like how it displays in Special:Categories page.

Any help is appreciated.

Resiniferous answered 11/5, 2016 at 5:41 Comment(2)
Why not use Extension:CategoryTree?Johnnyjohnnycake
I read about the extension .. i can see that it is used to visualise the structure of the categories. For example : <categorytree mode=pages>Manual</categorytree> . This syntax is used to display the category structure of Manual category. What i want is like i want to display all the categories in my wiki. Is it possible thru Extenion:CategoryTree?Resiniferous
C
15

The only built-in ways to display all categories are the special pages Special:Categories and Special:AllPages (in a default MediaWiki setup the categories are in NS 14, so Special:AllPages?namespace=14). Of those two, AllPages is transcludible, meaning that you can do like this on your main page:

{{Special:AllPages|namespace=14}}

If you want more control over the output, I suggest you use an extension like Semantic MediaWiki (advanced, full control), or CategoryTree (but as you noted, you will have to organize your category in a tree structure, with a common root).

Catlee answered 11/5, 2016 at 7:28 Comment(2)
That {{Special:AllPages|namespace=14}} is just what I was looking for!Denyse
According to the page to linked to, {{Special:Prefixindex/Category:}} should do the same, but the list doesn't include the Category: prefix for each entry.Vapory

© 2022 - 2024 — McMap. All rights reserved.