Template:DPL: Difference between revisions

From DynamicPageList3 Manual
Content added Content deleted
imported>FrozenPlum
m (Retest a swap to DPLvar, the underscore was problematic before)
imported>FrozenPlum
m (Name has since changed for desired section)
 
(22 intermediate revisions by the same user not shown)
Line 1: Line 1:
<onlyinclude><includeonly>{{#dplvar:set|page2}}<!--
<onlyinclude><includeonly>[[{{#switch: {{{1}}}
-->{{#vardefine:page|
{{#switch: {{{1}}}
| #dplvar = Dplvar
| #dplvar = Dplvar
| #dplnum = Dplnum
| #dplnum = Dplnum
Line 33: Line 31:
| rows
| rows
| rowsize
| rowsize
| rowcolformat = Controlling output format
| rowcolformat
| variable
| variables
| CATBULLETS
| %CATBULLETS%
| CATLIST
| %CATLIST%
| CATNAMES
| %CATNAMES%
| CONTRIB
| %CONTRIB%
| CONTRIBUTION
| %CONTRIBUTION%
| CONTRIBUTOR
| %CONTRIBUTOR%
| COUNT
| %COUNT%
| COUNTFS
| %COUNTFS%
| COUNTFS2
| %COUNTFS2%
| DATE
| %DATE%
| DPLTIME
| %DPLTIME%
| EXTERNALLINK
| %EXTERNALLINK%
| FIRSTNAMESPACE
| %FIRSTNAMESPACE%
| FIRSTTITLE
| %FIRSTTITLE%
| IMAGE
| %IMAGE%
| IMAGESEL
| %IMAGESEL%
| LASTNAMESPACE
| %LASTNAMESPACE%
| LASTTITLE
| %LASTTITLE%
| NAMESPACE
| %NAMESPACE%
| NR
| %NR%
| PAGE
| %PAGE%
| PAGEID
| %PAGEID%
| PAGES
| %PAGES%
| PAGESEL
| %PAGESEL%
| PFUNC
| %PFUNC%
| REVISION
| %REVISION%
| SCROLLDIR
| %SCROLLDIR%
| SECTION
| %SECTION%
| SIZE
| %SIZE%
| SIZEFS
| %SIZEFS%
| TAG
| %TAG%
| TAGBODY
| %TAGBODY%
| TITLE
| %TITLE%
| TOTALPAGES
| %TOTALPAGES%
| USER
| %USER%
| VERSION
| %VERSION% = Controlling output format


<!-- Controlling output order -->
<!-- Controlling output order -->
Line 93: Line 165:
| notlastmodifiedby
| notlastmodifiedby
| title
| title
| title<
| titlelt
| title>
| titlegt
| scroll
| scroll
| titlematch
| titlematch
Line 134: Line 206:
| debug
| debug
| execandexit
| execandexit
| cacheperiod = Other parameters
| dplcache
| dplcacheperiod = Other parameters


<!-- General use and invocation syntax -->
| #default =
| scrolling
}}}}<!--
| syntax
| URL parameters
| DPL_count
| DPL_offset
| DPL_refresh
| DPL_fromTitle
| DPL_toTitle
| DPL_arg1
| DPL_arg2
| DPL_arg3
| DPL_arg4
| DPL_arg5 = General usage and invocation syntax
| #default = {{{1}}}
}}<!--


---- Second half of the URL (the anchor or no anchor)
-->{{#ifeq:{{#dplvar:page}}|<!--
---- Note: # is replaced by &#35; the HTML entity for #
-->|{{#dplvar:set|page2|
{{#switch: {{{1}}}
-->{{#switch: {{{1|}}}
<!-- Other pages These links will have a different formatting than the links in the list above-->
| Characters with special meaning
| Scrolling
| URL parameters = General usage and invocation syntax


<!-- other DPL modules and syntax, link to respective pages, no anchor -->
| userformat
| #dplvar
| VARIABLES = Controlling output format
| #dplnum
| #dplreplace
| #dplmatrix
| #dplchapter
| syntax =


<!-- scrolling, link to #Scrolling -->
| Select articles based on REVISION dates
| scrolling = &#35;scrolling
| REVISION
| Criteria for page selection
| selection criteria = Criteria for page selection


<!-- variables, link to #variables -->
| #default =
| variable
}}}}
| variables
|<span class=dpl3><!-- Those found in the first list (dpl parameters and functions) will be formatted differently than those found in the second list
| CATBULLETS
-->}}<!--
| %CATBULLETS%
| CATLIST
| %CATLIST%
| CATNAMES
| %CATNAMES%
| CONTRIB
| %CONTRIB%
| CONTRIBUTION
| %CONTRIBUTION%
| CONTRIBUTOR
| %CONTRIBUTOR%
| COUNT
| %COUNT%
| COUNTFS
| %COUNTFS%
| COUNTFS2
| %COUNTFS2%
| DATE
| %DATE%
| DPLTIME
| %DPLTIME%
| EXTERNALLINK
| %EXTERNALLINK%
| FIRSTNAMESPACE
| %FIRSTNAMESPACE%
| FIRSTTITLE
| %FIRSTTITLE%
| IMAGE
| %IMAGE%
| IMAGESEL
| %IMAGESEL%
| LASTNAMESPACE
| %LASTNAMESPACE%
| LASTTITLE
| %LASTTITLE%
| NAMESPACE
| %NAMESPACE%
| NR
| %NR%
| PAGE
| %PAGE%
| PAGEID
| %PAGEID%
| PAGES
| %PAGES%
| PAGESEL
| %PAGESEL%
| PFUNC
| %PFUNC%
| REVISION
| %REVISION%
| SCROLLDIR
| %SCROLLDIR%
| SECTION
| %SECTION%
| SIZE
| %SIZE%
| SIZEFS
| %SIZEFS%
| TAG
| %TAG%
| TAGBODY
| %TAGBODY%
| TITLE
| %TITLE%
| TOTALPAGES
| %TOTALPAGES%
| USER
| %USER%
| VERSION
| %VERSION% = &#35;variables


<!-- URL params, link to #URL parameters -->
-->{{#ifeq:{{#dplvar:page}}{{#dplvar:page2}}|<!-- if not on either list
| URL parameters
-->|{{#if:{{#pos:{{lc:{{{1}}}}}|example}}{{#pos:{{lc:{{{1}}}}}|test}}<!-- if either an example or a test (on another page)
| DPL_count
-->|{{ifexists|Example:_{{{1}}} <!-- calls a dpl which may be slower? than the previous {{#if:{{#pos statement
| DPL_offset
-->|[[Example:_{{{1}}}|{{{2|{{{text|{{{1}}}}}}}}}]]<!-- only if the page exists
| DPL_refresh
-->|{{#tag:span|{{{1}}} not found|style=color:red}} <!-- <-if {{{1}}} isn't on the list, and the page doesn't exist.
| DPL_fromTitle
-->}}<!--
| DPL_toTitle
-->|{{ifexists|{{{1}}} <!-- calls a dpl which may be slower? than the previous {{#if:{{#pos statement
| DPL_arg1
-->|[[{{{1}}}|{{{2|{{{text|{{{1}}}}}}}}}]]<!-- only if the page exists
| DPL_arg2
-->|{{#tag:span|'{{{1}}}' not found|style=color:red}} <!-- <-if {{{1}}} isn't on the list, and the page doesn't exist.
| DPL_arg3
-->}}<!--
| DPL_arg4
-->}}<!--
| DPL_arg5 = &#35;Scroll/URL parameters
-->|{{#if:{{#pos:{{{1}}}|#dpl}}<!--
-->|[[{{#dplvar:page}}|{{{2|{{{text|{{{1}}}}}}}}}]]<!-- DPL functions
-->|[[{{#dplvar:page}}{{#dplvar:page2}}#{{{1}}}|<!--
-->{{#forargs:|p|v|}}{{#if:{{#dplvar:p}}<!-- check for usage of "=" in parameters
-->|{{{2|{{{text|{{{1}}}}}}}}}<!--
-->|{{{1|}}}={{#dplvar:v}}}}<!--
-->]]<!--
-->}}<!--


-->}}<!--
<!-- default is #{{{1}}} -->
| #default = &#35;{{{1}}}
-->{{#ifeq:{{#dplvar:page}}|||</span>}}</includeonly></onlyinclude>
}}|<!--
-- Link display text
-->{{#if:{{{2|}}}|{{{2}}}|{{{1}}}}}]]</includeonly></onlyinclude>
{{Documentation}}
{{Documentation}}

Latest revision as of 07:13, 21 April 2023

[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.

Example:

To include parameter values:

  • {{DPL|mode}} followed by [[=userformat]] gives mode=userformat (with redirect created from =userformat to mode)
  • Just doing {{DPL|mode}}=userformat is also fine, resulting in mode=userformat
[view | edit | purge]The above documentation is transcluded from Template:DPL/doc.