Jeffrey
Jeffrey

Reputation: 2149

Dont show 'pages in category' list in mediawiki

In media wiki on a category page it says 'Pages in category' It then lists all of the pages in that category.

Is there a way I can hide this on one category page?

I will creating all the links to the pages on a table on this page instead, allowing me to further customise how it is presented to the user

Upvotes: 2

Views: 827

Answers (2)

olpen4
olpen4

Reputation: 21

For posterity:

Without CategoryPageView hook, I added

.mw-category-generated
{
  visibility: hidden;
  display:none;
} 

to:

MediaWiki:Common.css

MediaWiki version: 1.34.0

Upvotes: 2

leo
leo

Reputation: 8520

Unless you need you users to be able to edit the category pages, the easiest way might be to use the CategoryPageView hook, to completely replace the category pages with whatever you want to show there. For some examples of how to do that, see the list of CategoryPageView extensions.

If you want something more complex, you'll have to extend the classes CategoryPage and CategoryViewer, do add whatever behaviour you want.

Then again, you could always just add

.mw-pages {display: none;}

to MediaWiki:Common.css, if you are satisfied with just hiding the pages for most users. This will not work if you have set $wgUseSiteCss to false (it's true by default).

Upvotes: 0

Related Questions