Revision as of 22:05, December 9, 2021 by Jose.druker@genesys.com (talk | contribs) (Adding component to the list of fields)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

OptionsHeaderNonstandard

This query template, which is based on Template:OptionsHeader, prints the list of options at the top of each section page in a non-Config Options Ref manual. The use case is expected to be hidden options or options for a restricted product. The template uses a parallel formatting template: Template:OptionsSectionPrintLinksNonstandard. The template requires the |compshort and |section parameters to be specified and also accepts the following optional parameters:

  • hidden -- If not specified, the query looks for hidden=true/yes
  • configobject -- If not specified, the query uses only configobject=Application
  • customgroup -- Enables the list of links to be broken up into subgroups
  • header -- Suppresses the "PDF this page" and "Create new option" links
  • prodshort -- If not specified, the query uses the second element in the Ponydocs address

The query switches for published vs. draft versions, with the published version returning only options with populated PubOption parameters. Content is:

{{#switch:{{{header}}}|no=|#default={{#switch:{{PONYDOCSSTATUS}}|unreleased=
{{#formlink:form=OptionCreate
| link text=Create new option
| link type=button
| query string=Options:CreateOption[component]:CreateOption[section]:CreateOption[parameter]
}}|#default=}}
}}{{ColumnFormat|content=
{{#cargo_query:
tables=OptionCreate,PubOption,DraftOption,PubExtended,DraftExtended
|join on=OptionCreate._pageName = PubOption._pageName,PubOption._pageName=DraftOption._pageName,PubOption._pageName=PubExtended._pageName,DraftOption._pageName=DraftExtended._pageName
|fields=OptionCreate._pageName=pagename,OptionCreate.parameter=parameter,OptionCreate.urlparameter=urlparameter,OptionCreate.compshort=compshort,OptionCreate.component=component,OptionCreate.urlsection=urlsection,OptionCreate.prodshort=prodshort,PubOption.shortdesc=PubShort,DraftOption.shortdesc=DraftShort,OptionCreate.configobject=configobject
|where=(DraftOption.hidden="{{#if:{{{hidden|}}}|{{{hidden}}}|true}}" OR DraftOption.hidden="True" OR DraftOption.hidden="Yes" OR PubOption.hidden="{{#if:{{{hidden|}}}|{{{hidden}}}|true}}" OR PubOption.hidden="True" OR PubOption.hidden="Yes") AND OptionCreate.compshort="{{{compshort}}}" AND OptionCreate.urlsection="{{Template:ReplaceURL|{{{section}}}}}" AND OptionCreate.prodshort="{{#if:{{{prodshort|}}}|{{{prodshort}}}|{{#explode:{{FULLPAGENAME}}|:|1}}}}"{{#if:{{{configobject|}}}| AND OptionCreate.configobject="{{{configobject}}}"| AND OptionCreate.configobject="Application"}}{{#switch:{{PONYDOCSSTATUS}}|unreleased=|#default= AND (PubOption.shortdesc IS NOT NULL)}} {{#if:{{{customgroup|}}}| AND (PubExtended.customgroup HOLDS LIKE "%{{{customgroup}}}%"{{#switch:{{PONYDOCSSTATUS}}|unreleased= OR DraftExtended.customgroup HOLDS LIKE "%{{{customgroup}}}%"|released|#default=}})|}}
|default=No public options in this section. 
|format=template
|template=OptionsSectionPrintLinksNonstandard
|named args=yes
|limit=2000
}}
}}



No public options in this section.

This page was last edited on December 9, 2021, at 22:05.
Comments or questions about this documentation? Contact us for support!