Thread:Extension talk:DynamicPageList (Wikimedia)/Hack: Add optional headings for lists

The following additions provide headings for any list that displays results. This can be useful since it avoids trying to test for results in a template (which is very difficult to do).

The following has been tested on the version of DPL which works with MW 1.16.

This will provide headings for the ordinary lists, but not the gallery view.

The extra parameters are thus:
 * - Text to use as a heading if results are found.
 * - Tag to surround the heading text with. One of:
 * h2-h6 (headings 2 through 6)
 * b (bold)
 * br (bold followed by a br tag.

Example:  category   = Foo headingtext = List of Foo headingtag = h2  Please note that the headings won't appear in the table of contents, regardless of which tag is used, but they will be formatted to appear laccording to the tag chosen.