Topic on Skin talk:Vector

Change logo depending on namespace

4
37.162.29.140 (talkcontribs)

Hi, I'd like to have a different logo (the one on the top left) depending on the namespace the current page is on, and clicking it should lead to the namespace's main page instead of the wiki's home page. Is this doable in Vector?

37.162.29.140 (talkcontribs)

PS: I managed to change logos by adding to MediaWiki:Vector.css a line for each namespace, like this:

.ns-NNN #p-logo a { background-image: url(IMAGE) !important; }

... where NNN is the namespace's number and IMAGE is the full url of the logo.

Now I just need to know if it's possible to make so that clicking on a logo takes me to the namespace's main page.

Dinoguy1000 (talkcontribs)

You would need to use Javascript to do that, though I don't know enough to be able to help you with it.

Olekdia (talkcontribs)

It seems you are trying to do that I want: use one mediawiki instance for different portals.

I have changed url of Logo as well for different namespaces:

  1. Edit MediaWiki:Mainpage set next content '{{NAMESPACE}}:Wiki', or 'Special:MyLanguage/{{NAMESPACE}}:Wiki' if you use wikitranslate extension.
  2. Create main pages for every namespaces: Some_space1:Wiki, Some_space2:Wiki, ... etc.

Now it should work properly

Reply to "Change logo depending on namespace"