[Mediawiki-l] Easy creation of page sequences

Evelyn Yoder eyoder at gmail.com
Tue Sep 15 03:35:07 UTC 2009


Have you considered organizing pages by Category, and using the Category
Tree extension? The Category Tree can be loaded to the sidebar, as a table
of contents.

Evelyn
http://AppsWhisperer.com


-----Original Message-----
From: mediawiki-l-bounces at lists.wikimedia.org
[mailto:mediawiki-l-bounces at lists.wikimedia.org] On Behalf Of Jean-Marc van
Leerdam
Sent: Monday, September 14, 2009 2:11 PM
To: MediaWiki announcements and site admin list
Subject: [Mediawiki-l] Easy creation of page sequences

Hi,

I have been trying to create a maintainable way of grouping pages together
and allowing readers to page through them in sequence. Most samples I've
seen use templates that require you to supply the 'previous' and 'next'
page. This however results in three page edits to insert a new page between
two existing pages and does not guarantee that your prev-sequence is
identical to the next-sequence...

Being a programmer, that is way too much duplicate and error-prone work for
me ;-) There must be a better way to do this and I was hoping to solve it
with a plain MW installation (with ParserFunctions and DynamicPageList at
the moment).

Given an 'index' page that holds a list of all page titles in the preferred
order, isn't it possible to create a template that selects the correct
previous and next page title given the current page title?

I get stuck in getting the correct lines from the index page. DPL can select
based on section name (= page title), but then the contents of that index
section must be the prev/next links themselves:

=First Page=
Prev [[Second Page|Next]]
=Second Page=
[[First Page|Prev]] [[Third Page|Next]]
=Third Page=
.. etc.

This works, except that it is still a lot of duplication of page names (but
the edits are contained in a single page, big plus).

I hoped to simplify the index page by creating a template that writes the
section header and prev/next links, but then DPL no longer recognizes the
sections :-( Apparently DPL 'sees' the page text before the templates are
called ({{Page|Prev page|Page title|Next page}}:

{{Page||First Page|Second Page}}
{{Page|First Page|Second Page|Third Page}} {{Page|Second Page|Third
Page|Fourth Page}}

Basically my questions are:
1. Am I completely off track here?
2. Can DPL be coerced to evaluate templates before looking at the page 3.
Can DPL (or another extension) select the text from a section before/after a
matched section?
4. Is it possible to determine the section sequence number given the section
name (so 'Second Page' results in 2, allowing me to use DPL to retrieve the
name of section 2 -/- 1 and 2 + 1 to create the prev/next links?

Apologies for the long post, hopefully someone can point me to some good
resources (I've been to Meta, Wikibooks, Medawiki.org but could very well
have overlooked something there as the amount of info is a bit overwhelming
and it is difficult to judge how up to date it is).

--
Regards,

Jean-Marc

_______________________________________________
MediaWiki-l mailing list
MediaWiki-l at lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l




More information about the MediaWiki-l mailing list