Jump to: navigation, search

PDMListDPL

This DPL template constructs lists of objects in the database. It requires a parameter called "object" in the template call to identify the type of object (Table, View, SubjArea, Schema). The parameter value must exactly match the prefix used in the page name in the Library book for objects of that type. It also accepts optional parameters:

  • "group" limits the DPL result based on the |group parameter on the Library page.
  • schema limits the DPL result based on the |schema parameter on the Library page
  • "withDesc" includes the object's short description in the list entry, and displays the results in a table.
  • "pattern" restricts the list to pages whose URLs match the specified pattern.
  • "notpattern" restricts the list to pages whose URLs do not match the specified pattern.

Formatting of the list is controlled by parallel sets of phantom templates: Template:PDMTable.dpl3, Template:PDMView.dpl2, Template:PDMs_SubjectArea.dpl3, and Template:PDMSchema.dpl2 for lists with the short descriptions, and Template:PDMTable.dpl4, Template:PDMView.dpl3, Template:PDMs_SubjectArea.dpl4, and Template:PDMSchema.dpl3 for lists without.

{{#if:{{{group|}}}|{{#dpl:
|namespace=Documentation
|titlematch={{#if:{{{pattern|}}}|{{{pattern}}}|{{#switch:{{PONYDOCSSTATUS}}
|unreleased
|preview = {{#switch:{{PONYDOCSPRODUCTSHORT}}
|PSAAS=GIM:Library:%{{{object}}}-%:8.5DRAFT
|#default={{#explode:{{FULLPAGENAME}}|:|1}}:Library:%{{{object}}}-%:{{PONYDOCSVERSION}}}}
|released= {{#switch:{{PONYDOCSPRODUCTSHORT}}
|PSAAS=GIM:Library:%{{{object}}}-%:8.5PDMSource
|#default={{#explode:{{FULLPAGENAME}}|:|1}}:Library:%{{{object}}}-%:{{#sub:{{#explode:{{FULLPAGENAME}}|:|4}}|0|3}}PDMSource}}}}}}
|nottitlematch={{#if:{{{notpattern|}}}|{{{notpattern}}}|}}
|uses={{#switch:{{{object}}}
|Table=Template:PDMTable
|View=Template:PDMView
|SubjArea=Template:PDMs_SubjectArea
|Schema=Template:PDMSchema}}
|includematch=/group\s*=\s*{{{group}}}/
|include={{#switch:{{{withDesc}}}
|yes={{#switch:{{{object}}}
|Table={PDMTable}.dpl3
|View={PDMView}.dpl2
|SubjArea={PDMs_SubjectArea}.dpl3
|Schema={PDMSchema}.dpl2}}
|
|no
|#default={{#switch:{{{object}}}
|Table={PDMTable}.dpl4
|View={PDMView}.dpl3
|SubjArea={PDMs_SubjectArea}.dpl4
|Schema={PDMSchema}.dpl3}}}}
|format={{#switch:{{{withDesc}}}
|yes={{{!}},\n {{!}}-,,{{!}}}
|#default=}}
|mode=userformat
}}|{{#dpl:
|namespace=Documentation
|titlematch={{#if:{{{pattern|}}}|{{{pattern}}}|{{#switch:{{PONYDOCSSTATUS}}
|unreleased
|preview = {{#switch:{{PONYDOCSPRODUCTSHORT}}
|PSAAS=GIM:Library:%{{{object}}}-%:8.5DRAFT
|#default={{#explode:{{FULLPAGENAME}}|:|1}}:Library:%{{{object}}}-%:{{PONYDOCSVERSION}}}}
|released= {{#switch:{{PONYDOCSPRODUCTSHORT}}
|PSAAS=GIM:Library:%{{{object}}}-%:8.5PDMSource
|#default={{#explode:{{FULLPAGENAME}}|:|1}}:Library:%{{{object}}}-%:{{#sub:{{#explode:{{FULLPAGENAME}}|:|4}}|0|3}}PDMSource}}}}}}
|nottitlematch={{#if:{{{notpattern|}}}|{{{notpattern}}}|}}
|uses={{#switch:{{{object}}}
|Table=Template:PDMTable
|View=Template:PDMView
|SubjArea=Template:PDMs_SubjectArea
|Schema=Template:PDMSchema}}
|includematch={{#if:{{{schema|}}}|/schema\s*=\s*{{{schema}}}/|}}
|include={{#switch:{{{withDesc}}}
|yes={{#switch:{{{object}}}
|Table={PDMTable}.dpl3
|View={PDMView}.dpl2
|SubjArea={PDMs_SubjectArea}.dpl3
|Schema={PDMSchema}.dpl2}}
|
|no
|#default={{#switch:{{{object}}}
|Table={PDMTable}.dpl4
|View={PDMView}.dpl3
|SubjArea={PDMs_SubjectArea}.dpl4
|Schema={PDMSchema}.dpl3}}}}
|format={{#switch:{{{withDesc}}}
|yes={{{!}},\n {{!}}-,,{{!}}}
|#default=}}
|mode=userformat
}}}}
This page was last edited on November 13, 2019, at 20:27.
Comments or questions about this documentation? Contact us for support!