Optionslink
Modified for temporary conversion of lightbox link to straight link. Also corrected to handle links to reference guide pages for options configured on other objects (e.g., DN-level, Switch-level, etc. options). The template now switches to use the phantom templates Template:Optionstmp.dpl2 or Template:Optionstmp.dpl7, based on the absence or presence of a |configobject parameter in the template call.
Original content was:
Handles in-content lightbox links to individual options. Used by writers, in their regular content, instead of direct links to option descriptions.
Phantom Template
- Template:Optionstmp.dpl2 — Controls how option is printed out in the lightbox call. Includes logic for applying change bars to draft content. Includes links to the option in the reference guide.
'''{{#ppin:{{#dpl:
|namespace=Options
|titlematch=%{{#explode:{{{link}}}|:|1}}:{{#explode:{{{link}}}|:|2}}%:{{#explode:{{{link}}}|:|3}}
|includematch={{#switch:{{PONYDOCSSTATUS}} |unreleased=/docstatus{{=}}Published{{!}}docstatus{{=}}Draft/
|preview=/docstatus{{=}}Published{{!}}docstatus{{=}}Draft/
|/docstatus{{=}}Published/}}
|noresultsheader=No option with that name
|include={Optionstmp}.dpl2
|mode=userformat
}}|{{#if:{{{parameter|}}}|{{{parameter}}}|{{#explode:{{{link}}}|:|3}}}}}}'''New content is:
{{#dpl:
|namespace=Options
|titlematch=%{{#explode:{{{link}}}|:|1}}:{{#explode:{{{link}}}|:|2}}%:{{#explode:{{{link}}}|:|3}}
|includematch={{#switch:{{PONYDOCSSTATUS}} |unreleased=/docstatus{{=}}Published{{!}}docstatus{{=}}Draft/
|preview=/docstatus{{=}}Published{{!}}docstatus{{=}}Draft/
|/docstatus{{=}}Published/}}
|noresultsheader=No option with that name
|include={{#if:{{{configobject|}}}|{Optionstmp).dpl7|{Optionstmp}.dpl2}}
|mode=userformat}}
Template:Optionstmp.dpl2.defaultTemplate:Optionstmp.dpl2.defaultTemplate:Optionstmp.dpl2.defaultTemplate:Optionstmp.dpl2.defaultTemplate:Optionstmp.dpl2.default
