Template: PDMPageQuery

From Genesys Documentation
Jump to: navigation, search

This is the main template used to populate the query-generated pages in the customer-facing PDMs. It also formats the templates for the respective Library book pages. It switches for the various types of pages, with separate Cargo queries (which, in turn, call various formatting templates, some with further sub-queries) to populate table (Template:PDMTablePageFormat), view (Template:PDMViewPageFormat), subject area (Template:PDMSubjAreaPageFormat), and any list pages that don't need surrounding text that we want to expose for freer editing. The default is to transclude the equivalent Library book page.

The transclusion part of the template accepts an optional |doc parameter, to specify a non-Library manual as the transclusion source.

This template has been modified from the one originally developed for Ponydocs. Since it no longer needs to cover ICON, some switches and query fields fall away.

Content is:

{{#switch:{{#explode:{{#explode:{{FULLPAGENAME}}|/|3}}|-|0}}
|Table=<!-- Query to populate Table pages-->
{{#cargo_query:
tables=PDMTable
|fields=_pageName=pageName,tableName=tableName,tableDesc=tableDesc,subjectAreas=subjectAreas,introduced=introduced,modified=modified,discontinued=discontinued,dataExport=dataExport,partitioned=partitioned,CONCAT('{{#replace:{{FULLPAGENAME}}|<nowiki/> |_}}')=page
|where=_pageName LIKE "{{#switch:{{MINTYDOCSVERSION}}|Library={{FULLPAGENAME}}|Current|#default={{#explode:{{FULLPAGENAME}}|/|0}}/Library/PDMLibrary{{#sub:{{#explode:{{anchorencode:{{#explode:{{FULLPAGENAME}}|/|2}}}}|_|0}}|5|3}}/{{#explode:{{FULLPAGENAME}}|/|3}}}}"
|format=template
|template=PDMTablePageFormat
|default=This table is reserved.
|named args=yes
}}
|View=<!-- Query to populate View pages-->
{{#cargo_query:
tables=PDMView
|fields=_pageName=pageName,viewName=viewName,viewDesc=viewDesc,subjectAreas=subjectAreas,introduced=introduced,modified=modified,discontinued=discontinued,dataExport=dataExport,SQLQuery=SQLQuery,CONCAT('{{FULLPAGENAME}}')=page
|where=_pageName LIKE "{{#switch:{{MINTYDOCSVERSION}}|Library={{FULLPAGENAME}}|Current|#default={{#explode:{{FULLPAGENAME}}|/|0}}/Library/PDMLibrary{{#sub:{{#explode:{{anchorencode:{{#explode:{{FULLPAGENAME}}|/|2}}}}|_|0}}|5|3}}/{{#explode:{{FULLPAGENAME}}|/|3}}}}"
|format=template
|template=PDMViewPageFormat
|named args=yes
}}
|SubjArea=<!-- Query to populate Subject Area pages-->
{{#cargo_query:
tables=PDMs_SubjectArea
|fields=_pageName=pageName,subjectArea=subjectArea,description=description,diagram=diagram,CONCAT('{{FULLPAGENAME}}')=page
|where=_pageName LIKE "{{#switch:{{MINTYDOCSVERSION}}|Library={{FULLPAGENAME}}|Current|#default={{#explode:{{FULLPAGENAME}}|/|0}}/Library/PDMLibrary{{#sub:{{#explode:{{anchorencode:{{#explode:{{FULLPAGENAME}}|/|2}}}}|_|0}}|5|3}}/{{#explode:{{FULLPAGENAME}}|/|3}}}}"
|format=template
|template=PDMSubjAreaPageFormat
|named args=yes
}}
|InfoMartReferences={{PDMRefQuery|page={{FULLPAGENAME}}}}
|#default=<!-- Default is to transclude the equivalent Library book page for the applicable version-->
{{ {{#switch:{{MINTYDOCSVERSION}}|Library={{FULLPAGENAME}}|Current|#default={{#explode:{{FULLPAGENAME}}|/|0}}/Library/PDMLibrary{{#sub:{{#explode:{{anchorencode:{{#explode:{{FULLPAGENAME}}|/|2}}}}|_|0}}|5|3}}/{{#explode:{{FULLPAGENAME}}|/|3}}}} }}
}}


Template:PDMPageQuery/Library/PDMLibrary/

Retrieved from "https://all.docs.genesys.com/Template:PDMPageQuery (2024-03-28 21:15:44)"