Template: GeneratePageListDPL

From Genesys Documentation
Jump to: navigation, search

This template is a DPL job aid to generate lists of wiki pages based on the page name, to assist in finding stray pages that may not be part of a manual and that may not predictably use one of the Article-type templates. It can also be used to generate a list of URLs for wiki export. It requires a |pattern parameter, to enforce a baseline limit for the query so that it doesn't risk compromising performance of the entire wiki. It also accepts the following optional parameters to further control the pages to look for:

  • draft — Specifies whether to look in the Draft namespace. There are three possible values for this parameter:
    • yes = Looks for pages in the Draft namespace (i.e., the pagename pattern starts with Draft:)
    • no = Looks for non-Draft pages (i.e., the pagename pattern does not start with Draft:)
    • both = Looks for both draft and published pages. This is also the default if the parameter is not specified.
  • notpattern — To specify what URL patterns to exclude.
  • uses — Finds pages using a particular template. This is particularly useful if it's not a Cargo template.
  • notuses — Finds pages not using a particular template.
  • firstrevisionsince — Finds pages edited since a particular date in YYYY-MM-DD format.
  • lastrevisionbefore — Finds pages last edited before a particular date in YYYY-MM-DD format.
  • createdby — Finds pages created by the specified user.
  • notcreatedby — Finds pages not created by the specified user.
  • modifiedby — Finds pages edited by the specified user.
  • notmodifiedby — Finds pages not edited by the specified user.

The last few parameters are most useful in combination -- for example, to find pages created by X but modified by Y before or after a specific date.

Content of the template is:

{{#if:{{{pattern|}}}|
{{#dpl:
|{{#switch:{{{draft|}}}|yes=namespace=Draft|no=namespace=|both|#default=}}
|titlematch={{{pattern}}}
|nottitlematch={{{notpattern|}}}
|uses={{#if:{{{uses|}}}|Template:{{{uses}}}|}}
|notuses={{#if:{{{notuses|}}}|Template:{{{notuses}}}|}}
|firstrevisionsince={{{firstrevisionsince|}}}
|lastrevisionbefore={{{lastrevisionbefore|}}}
|createdby={{{createdby|}}}
|notcreatedby={{{notcreatedby|}}}
|modifiedby={{{modifiedby|}}}
|notmodifiedby={{{notmodifiedby|}}}
|resultsheader=There are %PAGES% pages
}}|You must specify a pagename pattern so the query is not unlimited.}}


You must specify a pagename pattern so the query is not unlimited.

Retrieved from "https://all.docs.genesys.com/Template:GeneratePageListDPL (2024-09-01 06:41:20)"