Neel
Neel

Reputation: 9880

How to add Navlinks (or article path) in Mediawiki?

I have installed mediawiki 1.21. I am wondering how you can add navlinks (meaning the path to the page. Not sure if I am using the right work to describe it) at the top similar to the way it is in wikihow website? Below is an image so you know what I am referring to.. I find this to be very useful so users can understand where they are when reading an article.

I have created a custom skin and I have a Navlink DIV at the top where I would to show the path to that page there like: wiki -> xyz Category -> Article Name. I have semantic extension installed. Can this be achieved with that? Or is there another way to do it? How can I add the code directly in my skin.php file so this navlink is generated and listed depending on what page the user is on?

enter image description here

Upvotes: 1

Views: 588

Answers (1)

Dereckson
Dereckson

Reputation: 1411

Terminology

This kind of feature is called a breadcrumb.

Has MediaWiki already this kind of feature?

Yes, for subpages.

A subpage is a page intitulated Quux/Foo/Bar in a namespace with the subpage feature enabled. By default, this is the User namespace for example, but not the main one (For example, on Wikipedia projects, we want to be able to use titles like AC/DC).

In this situation, a breadcrumb Quux > Foo will be printed.

This doesn't solve your issue, as you want to use categories, but it allows you if you write your custom code to know there already is some code somewhere doing that :)

Breadcrumbs extensions

Some extensions have been developed to solve this particular issue:

The first is more exhaustive and gives you more flexibility, the second simpler and so a good starting point to write a custom stuff.

Upvotes: 3

Related Questions