Manual:Hooks/SidebarBeforeOutput

Details

 * $skin: Skin object
 * &$bar: Sidebar contents

Modify $bar to add or modify sidebar portlets.

Warning: You should probably use SkinBuildSidebar in order to use the caching system. This hook is run on each display and should be used if the contents of the sidebar vary on a per-request basis (e.g. Extension:DynamicSidebar).

Caveats
Currently languages and toolbox menus are available for modification in this hook, however whether they display or not will be determined by the skin that is rendering.

More information can be found in https://phabricator.wikimedia.org/T253783.

Examples
The following example allows you to add a new menu to the sidebar: To add a new menu