Topic on Project:Support desk

How to add "Go-Back" button in Mediawiki sub-pages

12
125.21.230.68 (talkcontribs)

Dear All,

I would like to keep "Go-Back" button in few of the pages inside the mediawiki web pages. So could you please help me with the same.

My Version: Midiawiki-1.18.3

Rgds, Mohan

125.21.230.132 (talkcontribs)

Hi,

Any update with the same???

Rgds, Mohan

Thorncrag (talkcontribs)

If you want to add a "go back" link, the simplest way perhaps would be to Manual:$wgRawHtml enable raw HTML then use <html><a href="javascript:history.go(-1)">Go back</a></html>. But if this is a public wiki, you probably don't want to enable raw HTML.

Krinkle (talkcontribs)

Using JavaScript to browse back in the history is not a good idea. Its wrong for so many reasons.

I believe Mohan is looking for a way to display "back" links when showing a sub page. That includes situations in which you were linked there from another page. So the browser history is not relevant in that case.

The solution is simple, MediaWiki generates these automatically. All you have to do is add the namespace in which you want this to happen, to your configuration of $wgNamespacesWithSubpages.

125.21.230.68 (talkcontribs)

Yes, Mr. Krinkle, you are right, I would like to keep “Go-Back” button to move my mediawiki page to its sub-pages.

So could you please elaborate how to configure ($wgNamespacesWithSubpages) option in my mediawiki???

Thanks in advance.

Rgds, Mohan

Krinkle (talkcontribs)
125.21.230.132 (talkcontribs)

Hi Krinkle, Even after seen the above given manual still i could not make out the "Go-Back" option in my wiki page. So could you please provide me step-by-step proccess.

Thanks, Mohan

87.139.192.56 (talkcontribs)

I enabled

  1. Enable subpages in all namespaces

$wgNamespacesWithSubpages = array_fill( 0, 200, true );

in LocalSettings.php, but I still get no back button, breadcrumbs or something similar. Any help?

188.47.165.129 (talkcontribs)

Probably you don't use subpages, check here how to use them: subpages help.

Bobbyray~mediawikiwiki (talkcontribs)
Ciencia Al Poder (talkcontribs)

Yes, the updates are on the messages from 26 jun 2012 and after

Idris, the wise (talkcontribs)

$wgNamespacesWithSubpages = array_fill( 0, 200, true );

worked for me

thanks

Reply to "How to add "Go-Back" button in Mediawiki sub-pages"