Topic on Skin talk:Minerva Neue

Is there a way to show categories on desktop ?

6
91.65.107.54 (talkcontribs)

hi guys. actually i can't see the categories in the desktop version ? (mobile i can see the categeories) is that a bug ?


$wgMinervaShowCategoriesButton['base'] = true;


doesn't work. any ideas ?

Jdlrobson (talkcontribs)

This should work but I think you need to be logged in to see it.

Leonardo Rocca (talkcontribs)

Not working for me as well. Even if logged in. Did you find any solution?

Bazantik (talkcontribs)

Hi, I use this command in LocalSettings.php:

$wgMinervaShowCategoriesButton = [ 'base' => true ];

I think you have a typo in your code.

Fuellel (talkcontribs)

I know I'm late to the party, but I had the same problem: Minerva Neue would show the categories in mobile mode (?mobileaction=toggle_view_mobile) but not in desktop mode (?mobileaction=toggle_view_desktop). I debugged the code and noticed that some skin options, like whether to show the categories or not, were never loaded by default, but only by the "MobileFrontend" extension in mobile mode.

Long story short, this is what I added to LocalSettings.php to make the categories show up in desktop mode too:

$wgHooks['RequestContextCreateSkin'][] = static function () {
	try {
		$ctx = MediaWiki\MediaWikiServices::getInstance()->getService( 'MobileFrontend.Context' );
		MediaWiki\Minerva\Hooks::setMinervaSkinOptions( $ctx, $ctx->getSkin() );
	} catch ( Wikimedia\Services\NoSuchServiceException $ex ) {
	}
};

This is based on https://github.com/wikimedia/mediawiki-skins-MinervaNeue/blob/ca0b7d90f9842334c479438b737d907c199cdc91/includes/Hooks.php#L269-L285.

It would be very interesting to know how mediawiki.org does this, as they do display categories (example: Skin:Minerva Neue) and I doubt they use the same fix.

BTW, please note that the $wgMinervaShowCategoriesButton configuration parameter has been removed; please use $wgMinervaShowCategories.

78.149.80.176 (talkcontribs)

Any movement on this - can see categories on mobile, nothing on desktop!

code fix above causes php errors and crashes system, so not a fix.

Reply to "Is there a way to show categories on desktop ?"