Dynamic Page Lists

From Salish Sea Wiki

There are over 1000 pages on the wiki describing workgroups and their efforts, places and topics. Any editor can use Categories to retrieve and sort automated lists of pages using two functions: Dynamic Page Lists and Category Trees. A Dynamic Page List requires a set of selection criteria that determine what pages are retrieved. This typically uses categories, namespaces, or page data such as the first or last edit date. You can also select pages by authorship, links, content search, or revision history, and can constrain the number of pages retrieved. This page gives you a brief introduction to the use of DPL, however the capabilities can become quite advanced for power users. Category Trees let you show branches of our Categories both with or without associated pages.

DPL Parameters

Dynamic Page List instructions currently live on at

Page Selection

  • category=Name or notcategory=Name - if you want the page to have all categories you must use multiple category criteria. If you want any page with any of several categories (an "OR" function) you can separate category names using the "|" symbol.
  • namespace=Main,File,Category,Template,User - this is useful for advanced users that want to discriminiate the kind of page based on the page type. Most pages on the wiki are in the namespace "Main" however other namespaces are used for files, categories and templates. The default namespace is always "Main".
  • uses=Template:Name or notuses=Template:Name - particularly useful for creating a list of places bese on their primary page time (rather than category), which is always indicated using a template.
  • titlematch=word% - the % symbol is used as a wild card, such that this will find all pages where the title begins with "word".
  • linksto=pagename - you can use "magic words" such as {{FULLPAGENAME}} to refer to the current page. The value can use % as a wildcard. You can also use notlinksto, linksfrom, etc.
  • Modifiedby=username - to limited the search to pages created or modified by specific users.

Output Formatting

  • count=5 - You can limit the number of pages returned to the initial number of a list, and so sort method and order then become critical for which pages are returned
  • ordermethod=title,titlewithoutnamespace,size,firstedit,lastedit, - you can deliver pages in an order defined by several parameters, here are some obvious examples.
  • order=ascending, descending - whether from first to last, or from last to first.
  • mode=unordered, ordered, inline, category - Defines the output, numbered lists are ordered, while bulleted lists are unordered. in-line delivers the list as in-line text separated by dashes. You can use bullets by using the inlinetext parameter below.
  • inlinetext=& nbsp; & bull; & nbsp; - for inline text, all spaces at the ends are stripped out. Adding this string makes the list nicely spaced with pages separated by pretty bullets consistent with our Platform Style Guide.
  • distinct=true - used when a query may identify select than one instance of a page meeting a parameter, and you only want a list of distinct pages.
  • shownamespace=false - we use this when querying over multiple namespaces (such as documents that are both off-site in the main namespace, and on-site in the file namespace, but where you don't want to include the namespace, so you can put them all together, perhaps in alphabetical order.

You can also have a DPL query deliver lists in columns by using various Formatting Templates

This is just an introduction, and this function is much more powerful than you might imagine. You can also use PHP regular expressions to find content using the parameter includematch=regex search string. Here are links to more advanced instructions:

DPL Code Samples

This query provides a bulleted list:

category=South Puget Sound|Whidbey Basin

This query provides a list of links in-line separated by bullets (you need to remove the space after the & to activate the code):

category=South Puget Sound|Whidbey Basin
inlinetext= & nbsp; & bull; & nbsp;

This query would return the first five pages in aphabetical order that have both the Place category, and either the South Puget Sound or Whidbey Basin categories. Notice that within the <DPL> invocation, all query parameters use the same format: "paramter=value". So to use DPL you need to know the various parameters and values you can use.

Category Tree Code Samples