0

I have a mediawiki site that has the following categories: Characters, Enemies, Weapons, Allies. Each Category has a list of pages (e.g. in Characters, i have char1, char2, etc.).

Lets say I'm currently viewing char2 page, I want to have a next/prev button so that I can directly view char3 or char1.

I can just use [char3|next page] and [char1|previous page] but the problem is i have so many pages that hardcoding every page to link to other pages can be tedious and painful and if I decided to add a page "new_char" and it happens to be in the middle of the list (mediawiki output them in alphanumeric order 0-9 then a-z), I'm going have to go through the pages again and hard-code everything.

Summary: I guess I'm looking for a way to dynamically link to prev/next page without hardcoding the links.

In this site pages are ordered alphabetically so adding a page doesnt necessarily mean that it will go to the end of the list.

alvinb
  • 115
  • 1
  • 1
  • 7

1 Answers1

0

make the URL contain the char page ie site.com/this.php?char=2 then $_GET['char'] and have the next/previous buttons add and subtract 1 from the number

iam-decoder
  • 2,554
  • 1
  • 13
  • 28