-1

I installed http://www.mediawiki.org/wiki/Extension:PageAfterAndBefore
But I don't know how to use it because there are no examples.
I know I have to use their syntax:
{{#pagebefore: context | namespace | title | category }}

But I played around and couldn't get it to work.
Does anyone know how to make this work?
How to add a Next and Previous link on my WikiMedia page?

There's a similar pages on this site
adding next and previous button on mediawiki pages
Previous/next page links using PHP
But I don't understand how to implement either solution.
Being a beginner is not fun.

2 Answers2

0

Can you show a snippet of the code as you're trying to use it? Otherwise, have you looked at the Discussion page of your first link? 'Trouble with usage' has what looks like a helpful answer.

Miss Scarlet
  • 51
  • 1
  • 7
  • I read and tried what was shown in 'Trouble with usage' but it doesn't work. Here's the snippet I'm trying to use (and doesn't work) At the bottom of my page is [[Category:Foundational_Document]] The snippets I tried are: firstpage: [[{{#firstpage:Foundational_Document}}]] pagebefore: [[{{#pagebefore:Foundational_Document}}]] pageafter: [[{{#pageafter:Foundational_Document}}]] lastpage: [[{{#lastpage:Foundational_Document}}]] – user3145909 Apr 02 '14 at 01:19
  • The output (what shows on the page) firstpage: English:MediaWiki:Common.css pagebefore: Main_Page pageafter: TestSMW lastpage: TestSMW – user3145909 Apr 02 '14 at 01:19
  • OK, that's interesting. I installed StubManager, the extension this one's dependant on, and I also installed PageBeforeAndAfter. Both showed up in my Special:Version page. Any attempt to include the template in my pages results in a white, blank page, which is like the 'blue screen of death' of wikis. – Miss Scarlet Apr 02 '14 at 14:32
  • So, where do we go from here? I'd like this to work. Does anyone know how to add a PREVIOUS and NEXT button to a wiki without having to manually add the anchor targets to any links. That was the whole purpose of PageAfterAndBefore. – user3145909 Apr 02 '14 at 15:48
0

I solved the problem on my sandbox wiki. Documentalist is my username there.

A short description of the solution: http://documentalists-sandbox.wikia.com/wiki/Tutorial
A working example: http://documentalists-sandbox.wikia.com/wiki/Using_JavaScript/Introduction
The code: http://documentalists-sandbox.wikia.com/wiki/Tutorial/dev/imp.js

The script contains an array Lessons that defines the page sequence. All anchors are generated from this array. The solution uses keywords too, but you can leave those empty if you don't need them.

p.kamps
  • 86
  • 4
  • I tried your example but it does not work. I created another stackoverflow question to hopefully address the issue. http://stackoverflow.com/questions/23047188/mediawiki-specialmypage-common-js-not-working – user3145909 Apr 13 '14 at 20:05