Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add image with link in a sidebar - MediaWiki

Tags:

php

mediawiki

I can add links to a MediaWiki sidebar this way:

* some-url|url-text

But how can i add image instead of text without hacking core or standard templates?

I have read this: http://www.mediawiki.org/wiki/Manual_talk:Interface/Sidebar#Images_in_the_navigation_bar

But it's just a feature request.

like image 544
Alexander Kim Avatar asked Oct 20 '25 04:10

Alexander Kim


1 Answers

Three possible approaches:

  1. Write a custom skin, that handles the sidebar any way you want.
  2. Write a tiny extension using the hook SkinBuildSidebar, to handle some custom code for images
  3. Use MediaWiki:Common.js to modify the sidebar using javascript.

I would without doubt go for 2.

edit: Note that some skins might ignore the SkinBuildSidebar hook. As long as you have no custom skins enabled, you should be fine, though.

like image 176
leo Avatar answered Oct 22 '25 17:10

leo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!