Is it possible to make Category and Subcategory link with expand functions. And disable link to category page.
Topic on Extension talk:CategoryTree
There have been a number of requests for this feature to be added to CategoryTree, see here... Thread:Extension talk:CategoryTree/Suggestion: CategoryTree enhancement for touch screens from May 2013 and here... Thread:Extension talk:CategoryTree/Suppress links to categories, only link to pages. from Oct 2013. Perhaps if someone logged a bug with this feature request it might get actioned? I don't understand Mediawiki extension development and enhancement processes.
I wrote a pretty stupid script to fix it. You should add it to Mediawiki:Common.js
I am not a js developer so probably it is bad written but it works.