Help:Dynamic Page Lists

From UBC Wiki
(Redirected from Help:DPL)
Jump to: navigation, search

Dynamic Page List (DPL) is a tool for listing multiple articles on a wiki that fit certain categories and other criteria. In its most basic form, DPL displays a list of pages in one or more categories. Page lists may also be based on factors such as author, namespace, date, name pattern, usage of templates or references to other articles. Output takes a variety of forms, some of which incorporate elements of selected articles.

Examples of Basic DPL Code

Below are some examples of basic DPL code. You can copy and paste the code into any pages.

Function DPL Code Notes
List All Pages in a Specific Category
<dpl>
category = UBC
</dpl>
This will generate a list for all pages in the category UBC. You can change UBC to any category.
List All Pages in a Specific Category in Three Columns
<dpl>
category = UBC
columns = 3
</dpl>
This will list the pages in three columns. The number of columns can be changed.
Show all subpages of a particular page
<dpl> 
titlematch={{PAGENAME}}/% 
namespace={{NAMESPACE}} 
shownamespace=false 
</dpl> 
This code can be added to a specific page with subpages (such as the a top level course page) and it will create a list of all the subpages of that main page. The variables {{PAGENAME}} and {{NAMESPACE}} tell the DPL code to use the exact page title and namespace of the page on which the code is located. You can also replace the variables with the specific name and namespace.
Show only top level subpages of a particular page (but not subpages of subpages)
<dpl> 
titlematch={{PAGENAME}}/% 
namespace={{NAMESPACE}} 
nottitlematch={{NAMESPACE}}/%/%
shownamespace=false 
</dpl> 
This code can be added to a page with subpages (such as the main course page) and it will create a list of the first level of subpages of that main page.
Show all articles in a namespace
<dpl>
namespace=Course
shownamespace=false
includesubpages=false
</dpl>
This will generate a list of all pages in the Course space. It will also drop the word "Course:" from the page titles in the list and it will not show subpages.