Help:DPL
From Meta, a Wikimedia project coordination wiki
| MediaWiki Handbook: Contents, Readers, Editors, Moderators, System admins +/- |
DynamicPageList or DPL for short is a MediaWiki extension supporting intersections and other set operations of pages belonging to several categories.
Contents |
[edit] Flavours
Two versions of dynamic page lists (DPL) exist, an older variant using tags <dynamicpagelist> plus </dynamicpagelist>, and an advanced variant using tags <dpl> plus </dpl>. A project can support none, one , or both of these two extensions, see "parser extension tags" in Special:Version.
The advanced version covers all functions of the older variant, here only the latter is explained. For further details see the descriptions in DynamicPageList and DynamicPageList2.
[edit] Operation
In essence categories are sets of related pages, created by adding [[Category:common property]] to the individual pages. In addition category pages are also ordinary pages in their first part with all features of normal pages, but their main purpose is to list all pages belonging to the category. This changes as soon as [[Category:common property]] is added or removed from one or more of the individual pages, the members of this set.
Watching the category page only tracks modifications to its first part (as for any ordinary page), but it doesn't show any additions or removals of member pages. DPLs address this missing feature, they also allow to sort member pages by various criteria where categories only offer a crude sort key or alphabetical order.
Simple DPLs start with <dynamicpagelist> followed by one or more category=name and optionally other parameter=value pairs, and they are terminated by </dynamicpagelist>. For a similar construct see inputbox.
One (first) category=name is required, and it's the base for some other attributes. Adding more category=name restricts the DPL to pages in the intersection of all specified categories.
With notcategory=name pages in that category are removed from the DPL. So for categories A, B, and C use category=A and category=B with notcategory=C for all pages in both A and B, but not C. And also not only in A, and not only in B.
Two DPLs could be used to get a kind of union, the first DPL for category A, and the second DPL for category B without A, but real unions require the advanced DPL features.
[edit] Restrictions
The attribute namespace= allows to restrict listed pages to a namespace given by its number or name. Use 0 for the main namespace.
The attribute redirects= can be exclude (default) not listing any redirects belonging to the selected categories. With include redirects are listed, and redirects=only limits the DPL to only redirects.
With counts=n the DPL is limited to the first n member pages as determined by the sort order (see below). The default is a system-wide maximum, with two DPLs looking at the same set from both ends it's indirectly possible to determine if really all selected pages are shown (see below).
[edit] Output
Use suppresserrors=true to suppress error messages for an empty DPL, e.g. if the selected category doesn't exist.
The default output mode=unordered presents the DPL as unordered list, XHTML <ul>, like Wiki list markup *.
Similarly ordered results in numbered <ol> output like Wiki list markup #. Finally mode=none presents the DPL with one entry per line, terminated with <br />, roughly similar to Wiki list markup ; (semicolon).
Especially in conjunction with namespace= the attribute shownamespace=false allows to suppress the output of the namespace.
[edit] Sorting
DPLs are either sorted by the date of the addition to the first category (this is often not the date of the creation of the individual page), the default ordermethod=categoryadd, or by ordermethod=lastedit, the date of the last modification of the member pages.
Sorting can be order=descending (default, most recent first) or order=ascending, allowing to look at the same set from both ends in two DPLs (see above).
[edit] Dates
With addfirstcategorydate=true the date of the addition to the first category is shown.
[edit] Example
If the following example doesn't work where you read this page look at it on Meta.
<dynamicpagelist> category=Reader handbook order=ascending ordermethod=lastedit mode=ordered shownamespace=false </dynamicpagelist>
This results in a numbered list of help pages, oldest first:
- Glossary
- Ayuda
- 差分
- リンク元
- ユーザの投稿記録
- 特別ページ
- ログイン
- 外装の詳細設定
- 個人設定
- 画像ページ
- 最近更新したページ
- 拡張版最近更新したページ
- リンク先の更新状況
- 印刷用バージョン
- 検索
- 履歴
- 表示ボタン
- ウォッチリスト
- القارئ
- صفحة الصورة
- Translation teams/ko/English-Korean Wikimedia Glossary
- مساعدة
- ヘルプ
- Conteúdo
- 目錄
- Nápověda:Obsah
- Допомога:Зміст
- Nápověda:Nápověda
- Contents
- Bantuan:Bantuan
- Reader
- Contents/pt-br
- Help
Another example:
<dynamicpagelist> category=Handbook templates notcategory=Templates using ParserFunctions mode=none addfirstcategorydate=true </dynamicpagelist>
This creates a plain list with the dates of the addition to the first (here only) category:
16 October 2009: Template:H:f Help
6 October 2009: Template:-
21 September 2009: Template:H:h Help
24 August 2009: Help:Editor
7 August 2009: Template:Ed
15 June 2009: Допомога:Зміст
17 May 2009: Help:Contents
9 April 2009: Template:MediaWiki links
25 March 2009: Ajuda:Conteúdo
1 March 2009: Template:Ph:Contents/pt-br
1 March 2009: Help:Contents/pt-br
1 March 2009: Template:جم القارئ
19 December 2008: Template:H:h 說明
10 August 2008: Aiuto:Template
1 April 2008: Nápověda:Obsah
19 March 2008: Template:H:h Aide
20 February 2008: Template:Xpd oldpp
10 January 2008: ヘルプ:ページサイズ
10 January 2008: مساعدة:تعديل طفيف
10 January 2008: ヘルプ:新規ページの作成
10 January 2008: Aiuto:Tabelle
9 January 2008: Template:H:f مساعدة
19 December 2007: Template:Wikilink syntax tbl
17 December 2007: Template:MediaWiki links ms
8 November 2007: Template:Xpdn
26 October 2007: Template:मिडियाविकि दूवे
31 July 2007: Template:H:f 說明
31 July 2007: Template:MediaWiki links/zh-hant
31 July 2007: Template:System admin toc/zh-hant
31 July 2007: Template:Moderator toc/zh-hant
31 July 2007: Template:Editor toc/zh-hant
31 July 2007: Template:Reader toc/zh-hant
12 July 2007: Template:MediaWiki links/ar
19 June 2007: Template:EdML
9 June 2007: Help talk:Template/onlyinclude demo
9 June 2007: Help:Template/onlyinclude demo
9 June 2007: Template:Beheerpagina's
9 June 2007: Template:H:htest
9 June 2007: Template:H:h
9 June 2007: Template:H:h Template
9 June 2007: Template:Reader toc ja
8 June 2007: User talk:Cumeo89
23 March 2007: Template:Ph:Reader
22 March 2007: Template:Помощь:System admin toc
18 March 2007: Template:Ediu
2 March 2007: Template:Помощь:Editor toc
15 February 2007: Template:Timd
8 February 2007: Template:H:Language-dependent variables
8 February 2007: Template:H:Miscellaneous variables
8 February 2007: Template:H:Position variables
8 February 2007: Template:H:Size variables
8 February 2007: Template:H:Modifier variables
8 February 2007: Template:H:Formatting variables
8 February 2007: Template:H:Namespace variables
8 February 2007: Template:H:Statistics variables
8 February 2007: Template:H:Section variables
8 February 2007: Template:H:Local time variables
8 February 2007: Template:H:Current time variables
8 February 2007: Template:H:Page name variables
25 January 2007: Template:MediaWiki linky
23 January 2007: Template:MediaWiki връзки
13 January 2007: Template:Ill
3 January 2007: Template:Edi
3 December 2006: Template:MediaWiki links/Ru
9 November 2006: Template:MediaWiki links/tr
6 October 2006: User:AaronPeterson/css play
3 September 2006: Template:MediaWiki nyje
3 September 2006: Template:Redaktuesi toc
3 September 2006: Template:Lexuesi toc
3 September 2006: Template:Ph:H:f Ndihmë
3 September 2006: Template:H:f Ndihmë
31 August 2006: Template:Kazalo za skrbnike
31 August 2006: Template:Ph:Vsebina
31 August 2006: Template:Povezave za MediaWiki
17 July 2006: Template:Moderator toc
30 June 2006: Template:H:f2 Aide
28 June 2006: Template:H:f2 Template
17 June 2006: Template:H:f
17 June 2006: Template:H:f Template
13 June 2006: Template:H:mwg
25 May 2006: Template:Edhf
7 May 2006: Template:Ph:Page for demos in the Help namespace
29 April 2006: Template:Помощь:Reader toc
29 April 2006: Template:Modifier
29 April 2006: Template:Modif
29 April 2006: Template:Edde
29 April 2006: Template:Reader toc/zh
29 April 2006: Template:Reader toc el
29 April 2006: Template:Lezer inhoud
29 April 2006: Template:H:f Помощь
29 April 2006: Template:H:f ヘルプ
29 April 2006: Template:H:f Hjelp
29 April 2006: Template:H:f Aiuto
29 April 2006: Template:H-langs:
29 April 2006: Template:Amministratori toc
29 April 2006: Template:System admin toc/zh
29 April 2006: Template:Помощь:Moderator toc
29 April 2006: Template:Moderator toc/zh
27 April 2006: Template:Editor toc
27 April 2006: Template:Ph:MediaWiki help policy
22 April 2006: Template:H:f Hilfe
22 April 2006: Template:H:f NL Help
22 April 2006: Template:H:f Aide
22 April 2006: Template:H:h NL Help
22 April 2006: Template:H:h Hjelp
22 April 2006: Template:H:l
22 April 2006: Template:H:
22 April 2006: Template:System admin toc
22 April 2006: Template:Reader toc
22 April 2006: Template:Ph:CheckUser
22 April 2006: Template:Unclear
22 April 2006: Template:Hh
Meta currently supports only the simple DPL.
[edit] Links to other help pages
- Help contents
- Meta | Wikinews | Wikipedia | Wikiquote | Wiktionary | commons: | mw: | b: | s: | mw:Manual | google
- Versions of this help page (for other languages see below)
- Meta | Wikinews | Wikipedia | Wikiquote | Wiktionary
- What links here on Meta or from Meta | Wikipedia | MediaWiki
- Reading
- Go | Search | Stop words | URL | Namespace | Page name | Section
- Backlinks | Link | Piped link | Interwiki link | Redirect | Category | Image page
- Logging in and preferences
- Logging in | Preferences | User style
- Editing
- Advanced editing | Editing FAQ | Edit toolbar | Export | Import | Shortcuts
- Tracking changes
- Recent changes (enhanced) | Related changes | Watching pages | Diff
- Page history | Edit summary | User contributions | Minor edit | Patrolled edit
- Style & formatting
- Wikitext examples | Reference card | HTML in wikitext | List | Table | Sorting | Colors
- Special input and output
- Inputbox | Special characters | Displaying a formula | Images (uploads) | EasyTimeline
- Advanced functioning
- Template | Advanced templates | Parser function | ParserFunctions | Parameter default
- Variable | Magic word | System message | Substitution | Array | Calculation
- Page management
- Starting a new page | Renaming (moving) a page | Protecting pages | Deleting a page
- Special pages
- Talk page | Testing | Sandbox | CentralNotice