Template:DPL3: Difference between revisions

From DynamicPageList3 Manual
Content added Content deleted
No edit summary
imported>FrozenPlum
m (need to put back to working prior to making public)
 
(13 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<includeonly>{{#vardefine:page_}}<!--
<onlyinclude><includeonly>{{#vardefine:page_}}<!--
-->{{#vardefine:page|
-->{{#vardefine:page|
{{#switch: {{{1}}}
{{#switch: {{{1}}}
Line 33: Line 33:
| rows
| rows
| rowsize
| rowsize
| rowcolformat = Parameters: Controlling output format
| rowcolformat = Controlling output format


<!-- Controlling output order -->
<!-- Controlling output order -->
| ordermethod
| ordermethod
| order
| order
| ordercollation = Parameters: Controlling output order
| ordercollation = Controlling output order


<!-- Controlling output volume -->
<!-- Controlling output volume -->
Line 63: Line 63:
| includepage
| includepage
| includemaxlength
| includemaxlength
| includetrim = Parameters: Controlling output volume
| includetrim = Controlling output volume


<!-- Criteria for page selection -->
<!-- Criteria for page selection -->
| category
| category
| categorymatch
| categorymatch
Line 122: Line 122:
| distinct
| distinct
| ignorecase
| ignorecase
| skipthispage = Parameters: Criteria for page selection
| skipthispage = Criteria for page selection


<!-- Other parameters -->
<!-- Other parameters -->
| updaterules
| updaterules
| deleterules
| deleterules
Line 135: Line 135:
| execandexit
| execandexit
| dplcache
| dplcache
| dplcacheperiod = Parameters: Other parameters
| dplcacheperiod = Other parameters


| #default =
| #default =
Line 143: Line 143:
-->|{{#vardefine:page_|
-->|{{#vardefine:page_|
{{#switch: {{{1}}}
{{#switch: {{{1}}}
<!-- Other pages -->
<!-- Other pages These links will have a different formatting than the links in the list above-->
| Characters with special meaning
| Characters with special meaning
| Scrolling
| Scrolling
| URL parameters = General Usage and Invocation Syntax
| URL parameters = General usage and invocation syntax


| userformat
| DPL Security = Source and Installation
| VARIABLES = Controlling output format


| Select articles based on REVISION dates
| VARIABLES = Parameters: Controlling output format
| REVISION
| Criteria for page selection
| selection criteria = Criteria for page selection


| #default =
| #default =
}}}}
}}}}
|<span class=dpl3><!-- Those found in the first list will be formatted differently than those found in the second list
|<span class=dpl3><!-- Those found in the first list (dpl parameters and functions) will be formatted differently than those found in the second list
-->}}<!--
-->}}<!--{{#forargs:|p|v|}}{{#if:{{#var:p}}|{{{1|}}}|{{{1|}}}={{#var:v}}}}


-->{{#ifeq:{{#var:page}}{{#var:page_}}|<!-- if not on either list
-->{{#ifeq:{{#var:page}}{{#var:page_}}|<!-- if not on either list
-->|{{#if:{{#pos:{{lc:{{{1}}}}}|example}}{{#pos:{{lc:{{{1}}}}}|test}}<!-- if either an example or a test (on another page)
-->|{{#if:{{#pos:{{lc:{{{1}}}}}|example}}{{#pos:{{lc:{{{1}}}}}|test}}<!-- if either an example or a test (on another page)
-->|{{ifexists|Extension:DPL3/Example:_{{{1}}} <!-- calls a dpl which may be slower? than the previous {{#if:{{#pos statement
-->|{{ifexists|Example:_{{{1}}} <!-- calls a dpl which may be slower? than the previous {{#if:{{#pos statement
-->|[[Extension:DPL3/Example:_{{{1}}}|{{{2|{{{text|{{{1}}}}}}}}}]]<!-- only if the page exists
-->|[[Example:_{{{1}}}|{{{2|{{{text|{{{1}}}}}}}}}]]<!-- only if the page exists
-->|{{#tag:span|{{{1}}} not found|style=color:red}} <!-- <-if {{{1}}} isn't on the list, and the page doesn't exist.
-->|{{#tag:span|{{{1}}} not found|style=color:red}} <!-- <-if {{{1}}} isn't on the list, and the page doesn't exist.
-->}}<!--
-->}}<!--
-->|{{ifexists|Extension:DPL3/{{{1}}} <!-- calls a dpl which may be slower? than the previous {{#if:{{#pos statement
-->|{{ifexists|{{{1}}} <!-- calls a dpl which may be slower? than the previous {{#if:{{#pos statement
-->|[[Extension:DPL3/{{{1}}}|{{{2|{{{text|{{{1}}}}}}}}}]]<!-- only if the page exists
-->|[[{{{1}}}|{{{2|{{{text|{{{1}}}}}}}}}]]<!-- only if the page exists
-->|{{#tag:span|{{{1}}} not found|style=color:red}} <!-- <-if {{{1}}} isn't on the list, and the page doesn't exist.
-->|{{#tag:span|'{{{1}}}' not found|style=color:red}} <!-- <-if {{{1}}} isn't on the list, and the page doesn't exist.
-->}}<!--
-->}}<!--
-->}}<!--
-->}}<!--
-->|{{#if:{{#pos:{{{1}}}|#dpl}}<!--
-->|{{#if:{{#pos:{{{1}}}|#dpl}}<!--
-->|[[Extension:DPL3/{{#var:page}}|{{{2|{{{text|{{{1}}}}}}}}}]]<!-- DPL functions
-->|[[{{#var:page}}|{{{2|{{{text|{{{1}}}}}}}}}]]<!-- DPL functions
-->|[[Extension:DPL3/{{#var:page}}{{#var:page_}}#{{{1}}}|<!--
-->|[[{{#var:page}}{{#var:page_}}#{{{1}}}|<!--
-->{{#forargs:|p|v|}}{{#if:{{#var:p}}<!--
-->{{#forargs:|p|v|}}{{#if:{{#var:p}}<!-- check for usage of "=" in parameters
-->|{{{2|{{{text|{{{1}}}}}}}}}<!--
-->|{{{2|{{{text|{{{1}}}}}}}}}<!--
-->|{{{1|}}}={{#var:v}}}}<!--
-->|{{{1|}}}={{#var:v}}}}<!--
Line 178: Line 182:


-->}}<!--
-->}}<!--
-->{{#ifeq:{{#var:page}}|||</span>}}<!--
-->{{#ifeq:{{#var:page}}|||</span>}}</includeonly></onlyinclude>
{{Documentation}}
--></includeonly><noinclude>
Formats, and where appropriate, creates a link to the proper dpl parameter, help page, or dpl parser function in the DPL Manual.<p></p>
For formatting %VARIABLES% and HTML tags, use Template:tt.


Example:<p></p>
<code><nowiki>{{dpl3|format}}</nowiki></code> gives {{dpl3|format}}<br/>
<code><nowiki>{{dpl3|format|DPL format statement}}</nowiki></code> gives {{dpl3|format|DPL format statement}}<br/>
<code><nowiki>{{dpl3|DPL Security}}</nowiki></code> gives {{dpl3|DPL Security}}<br/>
<code><nowiki>{{dpl3|#dplvar}}</nowiki></code> gives {{dpl3|#dplvar}}<br/>
<code><nowiki>{{dpl3|nonono}}</nowiki></code> gives {{dpl3|nonono}}

Parameter values may be included as well (in lieu of a 2nd parameter):<p></p>
<code><nowiki>{{dpl3|mode|=userformat}}</nowiki></code> gives {{dpl3|mode|=userformat}}<br/>
<code><nowiki>{{dpl3|mode|=}}</nowiki></code> gives {{dpl3|mode|=}}<br/>

[[Category:Template DPL]]</noinclude>

Latest revision as of 10:01, 29 March 2022

[view | edit | purge]Template Documentation
Formats, and where appropriate, creates a link to the proper dpl parameter, help page, or dpl parser function in the DPL Manual.

For formatting individual %VARIABLES% use Template:tt.

Usage

{{DPL|format}} gives format
{{DPL|format|DPL format statement}} gives DPL format statement
{{DPL|#dplvar}} gives #dplvar
{{DPL|non-existing page}} gives non-existing page

Parameter values may be included as well (in lieu of a 2nd parameter):

{{DPL|mode}}=userformat gives mode=userformat
{{DPL|mode}}= gives mode=

[view | edit | purge]The above documentation is transcluded from Template:DPL3/doc.