Topic on Project:Support desk

How to Show All Categories in CategoryTree Without a "Root" Category?

5
Summary by Johnywhy

Not possible.

You must have a "root" category to show all categories in the wiki.

Example: create a category called "TOC".

Add all other category pages to the TOC category, thus making them subcategories.

Now the following will list all categories:

{{#categorytree:TOC}}

You can use the hideroot option to hide the TOC root in the rendered Tree:

{{#categorytree:Foo|hideroot|mode=pages}}
Johnywhy (talkcontribs)

Extension:CategoryTree

Seems all syntax requires the admin manually type a "root" category.

{{#categorytree:Foo}}

But my wiki doesn't have a "root" category and subcategories-- it just has a collection of categories.

How to show all categories, without typing a "root" category?

Might be here, unsure: Extension:CategoryTree#Using MediaWiki: namespace pages

This returns nothing:

{{#categorytree:{{root category}}}} 
Bawolff (talkcontribs)

you don't need a specific "root" category. You just need a category for the category tree extension to start at. It can be any category

Johnywhy (talkcontribs)

so, if i want to show, in the TOC, all pages and categories on the entire wiki, then i would a need root category.

correct?

thx

Bawolff (talkcontribs)

If you just want to just list all categories in the wiki, you can use {{special:AllPages/Category:}}

Its mathamatically impossible to turn an arbitrary graph into a tree without a starting point.

Johnywhy (talkcontribs)

True. That will show "Category:" prefix next to each category.

You can also do the following, which will not show "Category:" prefix next to each category.

{{Special:PrefixIndex/Category:}}

However, neither of these is concerned with the CategoryTree extension. Neither provides a collapsible tree, neither shows pages.