Topic on Project:Support desk

Jump to navigation Jump to search

[RESOLVED] SubSidebar does not expand

12
31.45.54.164 (talkcontribs)

Hi

After upgading to MediaWiki 1.22 the links under the sections in the Sidebar became automaticly hidden under the headings. I would like the sections to be open and not hidden. Is this possible? http://heimskringla.no JJ

88.130.127.250 (talkcontribs)

Hi!

That is the collapsible navigation feature, which in 1.22 is integrated into the Vector skin. Formerly it was part of the Vector extension. With the extension you could disable collapsing with

$wgVectorFeatures['collapsiblenav']['global'] = false;

Does that also work with the skin?

31.45.54.164 (talkcontribs)

This is not working!

88.130.127.250 (talkcontribs)

I have just checked the according commit

https://git.wikimedia.org/commitdiff/mediawiki%2Fcore.git/603e6589e7678be099cea50129fde9696ef48c8b

and it does not look like there would be an option to disable this feature.

A nice way would be if it was possible to modify $out->addModules() as you can do with the new hook for $out->addModuleStyles(), however for addModules() I have not seen a hook.

One option might be to add this to the bottom of LocalSettings.php:

unset($wgResourceModules['skins.vector.collapsibleNav']);

This should prevent the skin from loading the collapsiblity-stuff (untested).

31.45.54.164 (talkcontribs)

This did not work.

Ciencia Al Poder (talkcontribs)

You could modify it with CSS (see Manual:Interface/Stylesheets). Each sidebar section has a element with a specific ID. You can use CSS to control the format, for example, force the display of the contents:

This example forces the content to be displayed always, for the Print/export element of the sidebar:

/* force the display of the contents of the section */
#p-coll-print_export  .body {
	display:block !important;
}
/* Option 1: hide the header */
#p-coll-print_export h3 {
	display:none;
}
/* Option 2: just hide the arrow in the header */
#p-coll-print_export h3 {
	background:none !important;
}
31.45.54.164 (talkcontribs)

Thanks Ciencia. This work for the print_export section only, using the /* force the display, but could not get it to work on the other section. Do you know where I find the specific ID for the other section I'm using in my wiki at http://heimskringla.no ? JJ

88.130.79.219 (talkcontribs)

View the source code of the page and search for "p-coll-".

DavisNT (talkcontribs)
188.220.44.109 (talkcontribs)

any way to reverse the effect of your code, and return to default?

Thanks

87.148.139.2 (talkcontribs)

Remove code from LocalSettings.php and empty the cache dir.

Reply to "[RESOLVED] SubSidebar does not expand"