Jump to content

Template:Wb/lad/DPL/0/doc

From Wikimedia Incubator

Lua error in package.lua at line 80: module 'Module:Wb/lad/Arguments' not found.

This is one of a series of subtemplates of {{Wb/lad/DPL}} that display increments of a long list of pages.

In addition to the parameters accepted by {{Wb/lad/DPL}}, this subtemplate also accepts three other parameters.

  • {{{ping}}} — Optional. If non-blank, this subtemplate is only being called to make sure it exists.
  • {{{increment}}} — Required. An integer number of pages to be listed by each subtemplate in the series.
  • {{{n}}} Required. An integer that names this subtemplate. The first subtemplate in the series is called 0, the second is 1, and so on.

If {{{ping}}} is non-blank, this subtemplate simply returns "ping" without doing anything else. This makes it possible for each subtemplate in the series to look for the next subtemplate in the series without using expensive parser function {{#ifexist:}} (instead, simply ping the next subtemplate and compare the result to "ping").

Otherwise, this subtemplate first uses subtemplate {{Wb/lad/DPL/simple}} to display up to {{{increment}}} pages of the list, and then calls the next subtemplate to display any remaining pages up to {{{count}}}.

The identity of the next subtemplate is determined via {{Wb/lad/DPL/name next}}, which detects when there are no more subtemplates available in the series and in that case diverts the call to {{Wb/lad/DPL/simple}}.

Of the parameters to {{Wb/lad/DPL}}, {{{count}}} is required by this subtemplate; if {{Wb/lad/DPL}} is not provided a value for this parameter, it calls {{Wb/lad/DPL/simple}} directly, bypassing the numbered series of subtemplates. {{{count}}} and {{{offset}}} are adjusted by each numbered subtemplate when it calls the next subtemplate. {{{showerror}}} is passed from {{Wb/lad/DPL}} to {{Wb/lad/DPL/0}}, and is passed from each numbered subtemplate in its initial call to {{Wb/lad/DPL/simple}}, but is nulled when calling the next subtemplate — so that if non-null showerror is passed to {{Wb/lad/DPL}}, it is only passed on to the first call to {{Wb/lad/DPL/simple}}.

Extending the series

[edit source]

To extend the series, check Special:Wb/lad/PrefixIndex/Template:Wb/lad/DPL/ to see what the next numbered subtemplate would be, and create that template with exactly the same content as all the preceding numbered subtemplates.