EWTE/nav: Difference between revisions

From OER in Education
No edit summary
No edit summary
 
Line 10: Line 10:
Pages can be listed with <nowiki>{{BasePageGroupShow}}</nowiki>:
Pages can be listed with <nowiki>{{BasePageGroupShow}}</nowiki>:
{{BasePageGroupShow}}
{{BasePageGroupShow}}
Alternative formatting is possible, e.g. <nowiki>{{BasePageGroupShow|format=, }}</nowiki>:
Alternative formatting is possible, e.g. <nowiki>{{BasePageGroupShow|format=list}}</nowiki> (see [https://semantic-mediawiki.org/wiki/Help:Result_formats]):


{{BasePageGroupShow|format=list}}
{{BasePageGroupShow|format=list}}

Latest revision as of 12:34, 5 January 2015

EWTE

[[|<<<]] [[|>>>]]

This is an example for how the Template:BasePageGroup is used to create navigation. See Template:BasePageGroup for further information. Simply include {{BasePageGroupNav}} on a page and sub-pages, and navigation is created automatically. The BASEPAGENAME (here EWTE) normally acts as a 'front page' or 'introduction page' (though this is not the case here).

"Previous" and "next" navigation links are created with {{BasePageGroupPrev}}{{BasePageGroupNext}}: [[|<<<]] [[|>>>]]


The advantages of this approach are:

  • Flexible creation of navigation, as simple as adding a generic template (Template:BasePageGroupNav) to each in a set of pages (and sub-pages) to create navigation.
  • The page itself 'knows' that it's part of the book (and where it is in the book), and can 'behave' accordingly, e.g. allowing for 'previous' and 'next' links.

The disadvantages of this approach are:

  • It does require a number of extensions to be installed (semantic mediawiki, as well as functions for arrays).
  • It does not integrate with the book extension, when in principle the functionality is similar.

Pages

Pages can be listed with {{BasePageGroupShow}}:

Alternative formatting is possible, e.g. {{BasePageGroupShow|format=list}} (see [1]):