Development:Bible navigation links

From Door43

Jump to: navigation, search
Home » Development » Bible navigation links

Contents

Door43 is configured with a Namespace called "Meta" that is used to contain information about how the various pieces of Door43 are related and structured. One of the primary uses to contain the information about the books and chapters of the Bible that enable the system to "know" what chapter is the next or previous, for any chapter of the Bible.

For instance, "Luke 1" is followed by "Luke 2" and preceded by "Mark 16". When a user is reading any chapter of Scripture, they need to be able to easily navigate to the previous and next chapters. Here is how we are enabling this in Door43.

How it Works

Conventions Used

Bible translations in Door43 use one page for each chapter with a space separating the book name and the chapter number, e.g. Bible:Luke 1, Bible:1 Timothy 3.[1]

The Meta Structure

Following this convention, there should be a page for every chapter of the Bible in the Meta namespace, e.g. Meta:Luke 1. Each page in the Meta namespace will have two subpages "/next" and "/prev", e.g. Meta:Luke 1/prev, Meta:Luke 1/next.

The content of these subpages contains the bookname and chapter that corresponds to its parent page. For instance, the page Meta:Luke 1/prev should contain only the text "Mark 16", while the page Meta:Luke 1/next should contain only "Luke 2".

Templates & Variables

Instead of manually adding "previous chapter" and "next chapter" links to every chapter of every book of the Bible in every language on Door43[2], we want to be able to add them automatically, based on the chapter of Scripture currently being used. MediaWiki makes this easy, by using templates.

A template that would do this could be very simple and would reference the variables called {{BASEPAGENAME}}, which is the title of the current page (excluding any parent pages). For example, the template might include this:

[[Bible:{{:Meta:{{BASEPAGENAME}}/prev}}|{{:Meta:{{BASEPAGENAME}}/prev}}]]

From left to right:

This might seem kind of nebulous without a real example to see in action. Check out the header links on the Luke 1 page of the TSI version of the Bible in Indonesian (in progress). It references this template where you can see the variables and Meta link structure in use.

Making it Work in Every Language

We need a means of creating the Meta structure for Bible links automatically for any/every language in Door43. To do that, we need a PHP script (so we can integrate it into our PHP front-end that will contain web-based utilities to generate other needed "stuff" to make using Door43 easier for end-users) that does the following:

  1. Input a list of translated booknames (so that booknames are localized into the target language)
  2. Create links for each chapter of every bookname (number of chapters for books of the Bible are a known number) in the Meta namespace
  3. Output an XML text file] in MediaWiki XML format that can be imported into the wiki to create the links for a given language.

Resources & Links


Footnotes

  1. Note: This convention makes it easier for distributed teams to work on a Bible translation a chapter at a time while minimizing edit conflicts. It also makes the content easier to manage on mobile devices.
  2. Approximately 16,646,000 links!
Personal tools
Namespaces
Variants
Actions
Door43
Projects
Toolbox
Print/export