Extension talk:CategoryTree

Jump to navigation Jump to search

About this board (talkcontribs)

Are there options to control how the tree is sorted? Ideally I'd like to be able to have the subcategories and articles sorted together instead of first subcategories and then articles, but I'm also curious what other options are available that might be interesting. If none are available, could this feature be added?

Jonathan3 (talkcontribs)

When assigning pages to categories you can add a sort key, e.g. [[Category:categoryname|sortkey]] Jonathan3 (talk) 13:31, 5 April 2019 (UTC) (talkcontribs)

I think you dont get it. Try with Articles AND Subcategories.

This dont work as intended.

Reply to "Sorting options"

How do I add a limit on how many pages categorytree should display per article?

Summary by MarioSuperstar77

Thank you Ciencia for the suggestion, your extension does exactly what I want. I will continue to use CategoryTree though.

MarioSuperstar77 (talkcontribs)

I read the manual, but besides changing $wgCategoryTreeMaxChildren (Which affects all pages and I do NOT want that) there does not seem to be a way to only show a specific amount of pages. Should I use parser functions?

Ciencia Al Poder (talkcontribs)

You can't set a limit when using <categorytree>. You'll have to use a DPL extension.

CategoryTree and MobileFrontend

Summary by Tacsipacsi

Fixed in 1.31, phab:T171767. (talkcontribs)

In mobile view (via Extension MobileFrontend) the collapse and expand bullets are not shown ... only the empty-bullet (grey) is visible.

is there any posibility to get this working?

Ciencia Al Poder (talkcontribs)
2003:C3:F12:1CE4:9D66:8822:802:D82E (talkcontribs)

oh - okay --- we use MW 1.27.5 at the moment ... so we have to wait until we plan and do an update :)

Amichai Nachmani (talkcontribs)

Is there a way to hide hidden categories from the tree?


Spas.Z.Spasov (talkcontribs)
Reply to "Hide hidden categories"

page ready for translation ?

Summary by Wladek92

done. Thanks all.

Wladek92 (talkcontribs)

The local translations are not linked to the messages of the EN page because these ones are not defined. Can we implement the <translate> sections to have synchronized translations ? Thank you.

Christian Wia (talk) 08:56, 30 June 2019 (UTC)

Ciencia Al Poder (talkcontribs)

Yes, although currently translated pages will revert to the english one once the page is marked for translation, and someone will need to manually copy and paste the existing translations into the corresponding translation units...

Wladek92 (talkcontribs)

ok I have reviewed the FR page totaly and leave it synchronised with the EN one to have a complete parallel translation when the individual messages will appear.

Ciencia Al Poder (talkcontribs)

You can do the review after the page has been marked for translation, since messages can have variables once it's translated. Let's add translate tags first on the EN page.

Wladek92 (talkcontribs)

ok but I wanted to finalize FR to have a global view since it's a big page. I 'll work on the EN page progressively now.

Undefined pages MediaWiki:Sidebarcategorytree & MediaWiki:Sidebarcategorytree-url

Summary by Wladek92


Wladek92 (talkcontribs)
Tacsipacsi (talkcontribs)

They are perfectly OK. If you want category tree link in your sidebar, you should create them. MediaWiki.org doesn’t want, so they haven’t been created here. A possible content is shown right after the links (the #ifeq codes).

Wladek92 (talkcontribs)

no I dont wank RED links on the documentation page. Same as in this topic. Do you see red ? . That 's what to correct.

Kghbln (talkcontribs)

Use template "Blue" for this, as in MediaWiki:Sidebarcategorytree-url. :)

Wladek92 (talkcontribs)
Kghbln (talkcontribs)

You mean adding content to this system message? No, this is not intended on this wiki. Probably I totally missed the point of this thread.

Wladek92 (talkcontribs)

ok if it is not intended so I keep the text and remove the link definition on the EN page.

bad link https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/CategoryTree.git;a=tree

Wladek92 (talkcontribs)
Ciencia Al Poder (talkcontribs)

I've fixed the link

Johnywhy (talkcontribs)

the tree still shows deleted pages.

Johnywhy (talkcontribs)

Tree shows old version of renamed page.

Any fix?


Urfiner (talkcontribs)

Try turn off cache with

$wgCategoryTreeDisableCache = true;

IF that doesn't work, check that solution to turn off web cache: User:Urfiner#Remove_cache

Arthaey (talkcontribs)

Running the `runJobs.php` maintenance script forced the categorytree to update for me.

Reply to "How to force refresh?"

Can't replace the toggle button pictures/signs

7 (talkcontribs)

The replacement doesnt work in MW 1.27 - it works only "on load" - after click on the image (for toggle) the other bullet isn't shown. it displays the given wiki code for the other bullet - like with "nowiki" tags around it - on the page. And then the toggle back (after clicking on this "textlink") still shows the code and doesn't display the first bullet again ...

Tacsipacsi (talkcontribs)

Could you clarify the problem? Some screenshots would certainly help. (You can upload them to a free image share website if you don’t want to sign up on MediaWiki.org.) (talkcontribs)

No solution yet ... we try the latest master-branch in some minutes ... maybe this will work?! i will give a report here after that ... (talkcontribs)

okay, the latest master-branch needs MW 1.29 at least ... so it doesn't work with MW 1.27

We try now the Extension Version for MW1.25 ... other users say that the problems with the collapse/expand pictures came with 1.26 ...

Telechick (talkcontribs)

Extension Snapshot 1.25 also doesn't work ... with MW 1.27 ...

Telechick (talkcontribs)

here i have some screenshots which shows the initial page, the "bad" design at toggle and the also bad design after toggle back at two examples ... (talkcontribs)

solved - i changed ".text" for collapse and expand node in ext.categoryTree.js to ".html" ... now it shows my images correctly ...

Reply to "Can't replace the toggle button pictures/signs"

Customized collapse/expand/empty images broken after update

Rbirmann (talkcontribs)


I am having an issue with this extension after upgrading MW from 1.22 to 1.26. I have also updated my CategoryTree extension from whatever version I had installed a couple of years ago to the latest available version, so I am not sure to which of these upgrades my issue is related.

In our wiki, back in MW 1.22 and the old CT version, we had changed the color of the category tree bullets by changing MediaWiki:categorytree-collapse-bullet, MediaWiki:categorytree-expand-bullet and MediaWiki:categorytree-empty-bullet to something like this:

<span style="color:#ffd15a;">▼</span>

This was working fine, but now, in MW 1.26 with the latest CT version, if I click on a ► bullet to expand the category tree, the clicked bullet is replaced by:

<span style="color:#ffd15a;">▼</span>

... as if the contents of MediaWiki:categorytree-collapse-bullet were enclosed in <nowiki> tags.

Is this intentional behaviour? Or is it a bug?

Either way, how can I change the color (or content) of the bullets in the latest CategoryTree version?

Maybe (just thinking out loud here), editing MediaWiki:Common.css and adding a CategoryTreeToggle style definition there? Haven't tried this...

Thanks in advance (talkcontribs)

just started working on a mediawiki site and had issues with the CategoryTree 1.26 extension. I ended up using an older version (I used 1.23). My issue with the 1.26 CategoryTree extension was it hid all of the WYSIWG buttons for the wiki editor.

I did change the color of my triangles. The CSS looks different than yours in my version of CategoryTree. The triangle element had a class surrounded it, so it was easy to target. Hope that helps

This post was hidden by Rbirmann (history)
Varlin (talkcontribs)

@Rbirmann I've got the same "span" problem since my upgrade to MW1.26... Did you find something to fix it?

EDIT : ok sorry I just totally forgot that I changed MediaWiki:categorytree-collapse-bullet page long time ago! It's better to remove it and use CSS... (talkcontribs)

Is there any solution to display some images instead of the triangles in MW 1.27 or newer? Can someone give some instructions. Thanks Gerd

Reply to "Customized collapse/expand/empty images broken after update"