Module:BethNaught/RHH/doc

From Wikisource
Jump to navigation Jump to search

This module can be used to assist in populating the {{RunningHeader}} template often used in page headers. Normally this requires manual editing to position the page number on the left or right; this module automatically does this based on the number's parity. The center text can also be automatically filled depending on the parity of the page number.

Usage[edit]

As an assistant to filling RunningHeaders, this module is intended to be substituted. For example, the code

{{{|{{subst:}}}#invoke:BethNaught/RHH|three|pagenum={{{pagenum}}}|center=BIBLICAL BIOLOGY.}}

placed in the header field of the index page will, upon editing a page, be rendered as e.g.

{{subst:#invoke:BethNaught/RHH|three|pagenum=5|center=BIBLICAL BIOLOGY.}}

which when saved becomes

{{RunningHeader||BIBLICAL BIOLOGY.|5}}

Parameters[edit]

  • The first parameter (which is actually the module function being called) is always "three". mandatory.
  • center_odd, center_even: the center text for odd- and even-numbered pages. Optional, default to empty string
  • center: the center text for all pages. Optional, defaults to empty string. Overrides center_odd and center_even if specified.
  • pagenum: the number of the current page. If not provided, or not an integer, an empty RunningHeader is output.

Examples[edit]

{{subst:#invoke:BethNaught/RHH|three|pagenum=600}}

{{RunningHeader|600||}}

{{subst:#invoke:BethNaught/RHH|three|pagenum=5|center=CENTER}}

{{RunningHeader||CENTER|5}}

{{subst:#invoke:BethNaught/RHH|three|pagenum=101|center_odd=ODD|center_even=EVEN}}

{{RunningHeader||ODD|101}}

{{subst:#invoke:BethNaught/RHH|three|pagenum=102|center_odd=ODD|center_even=EVEN}}

{{RunningHeader|102|EVEN|}}