Template:Infobox-DPL/doc
|
|
This is a documentation subpage for Template:Infobox-DPL (see that page for the template itself). It contains usage information, categories and other content that is not part of the original template page. |
Usage
This is a 'generalised' template to supply a DPL within any infobox. With no parameters specified to control number of articles, it will fall back to displaying the 7 (seven) most-recently published, and undisputed, articles in a bulleted list. A category to build the DPL from must be specified by using the first parameter, or specifying category=Foo. If omitted then, as above, a warning will be displayed documenting the detected fault.
- Thus {{Infobox-DPL|Scotland}} and {{Infobox-DPL|category=Scotland}} are equivalent.
- A second category may be specified by using intersecting=Bar
- Example: {{Infobox-DPL|Scotland|intersecting=Sports}} (or {{Infobox-DPL|category=Scotland|intersecting=Sports}})
Other options
- articlecount=n
- — Display n articles in the DPL
- shortlist=yes
- — Force the DPL to be restricted to 5 (five) articles maximum (overrides any specified articlecount value if this parameter is present)
- suppressdates=yes
- — Suppress the display of publication dates in the DPL
- excluding=category
- — Exclude a category from the DPL
Eg. use excluding=Culture and entertainment with a country category to "clean" a DPL - {{Infobox-DPL|United States|excluding=Culture and entertainment}} - bulleted=no
- — suppress bullets on the list, only outputting a DPL with line breaks between article titles
- column=n
- — Special parameter for use when multiple columns of articles are to be displayed (eg, a horizontal infobox as-opposed to a vertical one).
The first column (where the parameter need not be specified) is column=1, the second column=2 and so on.
For each column after the first, you must specify all other paramters exactly the same as on the first column!
So, {{Infobox-DPL|Scotland|intersecting=Crime and law|articlecount=3|bulleted=no}} displays as-follows:
{{#tag:DynamicPageList| stablepages=only category=Published notcategory=disputed notcategory=No publish category={{#if: {{{category|}}} | {{{category}}} | {{{1|Published}}} }} {{#if: {{{intersecting|}}} | category={{{intersecting}}} |}} {{#if: {{{excluding|}}} | notcategory={{{excluding}}} |}} addfirstcategorydate={{#if: {{{suppressdates|}}}|false|true}} count={{#ifeq: {{{shortlist|}}} | yes | 5 | {{#if: {{{articlecount|}}} | {{{articlecount}}} | 7}} }} {{#if: {{{column|}}} | offset = {{#expr:({{formatnum:{{{column}}}|R}} - 1 ) * {{#ifeq: {{{shortlist|}}} | yes | 5 | {{#if: {{{articlecount|}}} | {{{articlecount}}} | 7}} }} }} }} ordermethod=categoryadd suppresserrors=true {{#ifeq: {{{bulleted|}}} | no | mode=none |}} googlehack=true namespace=0 }}