Template:Delete3: Difference between revisions
Content added Content deleted
imported>FrozenPlum m (Update to move docs here) |
imported>FrozenPlum No edit summary |
||
Line 1: | Line 1: | ||
⚫ | |||
<!--Template to scroll through DPL result pages |
|||
⚫ | |||
-->{{#ifexpr:{{{total|0}}} > {{{count|0}}}|{{#ifexpr:{{{offset|0}}} > 0|{{#dplvar:set|lwrbound|{{#ifexpr:{{#expr:{{{offset|0}}} - {{{count|100}}}}} < 0|0|{{#expr:{{{offset|0}}} - {{{count|100}}}}}}}}}<!-- |
-->{{#ifexpr:{{{total|0}}} > {{{count|0}}}|{{#ifexpr:{{{offset|0}}} > 0|{{#dplvar:set|lwrbound|{{#ifexpr:{{#expr:{{{offset|0}}} - {{{count|100}}}}} < 0|0|{{#expr:{{{offset|0}}} - {{{count|100}}}}}}}}}<!-- |
||
Line 14: | Line 13: | ||
--></td></tr></table><noinclude> |
--></td></tr></table><noinclude> |
||
This template can be used in a DPL3 statement to scroll through DPL result pages. The parameters set in this template, must have their [[General_usage_and_invocation_syntax#URL parameters|URL parameter]] values set in the corresponding DPL3 statement per the usage example below. |
This template can be used in a DPL3 statement to scroll through DPL result pages. The parameters set in this template, must have their [[General_usage_and_invocation_syntax#URL parameters|URL parameter]] values set in the corresponding DPL3 statement per the usage example below. |
||
Line 22: | Line 22: | ||
|count = {%DPL_count:10%} |
|count = {%DPL_count:10%} |
||
|offset = {%DPL_offset:0%} |
|offset = {%DPL_offset:0%} |
||
|resultsheader = ²{DPL scroll¦total={{formatnum:{{PAGESINCATEGORY:category name}}¦R}}¦offset={%DPL_offset:0%}¦count={%DPL_count:10%}¦page={{FULLPAGENAME}}}²\n |
|resultsheader = ²{Extension DPL scroll¦total={{formatnum:{{PAGESINCATEGORY:category name}}¦R}}¦offset={%DPL_offset:0%}¦count={%DPL_count:10%}¦page={{FULLPAGENAME}}}²\n |
||
|resultsfooter = ²{DPL scroll¦total={{formatnum:{{PAGESINCATEGORY:category name}}¦R}}¦offset={%DPL_offset:0%}¦count={%DPL_count:10%}¦page={{FULLPAGENAME}}}²\n |
|resultsfooter = ²{Extension DPL scroll¦total={{formatnum:{{PAGESINCATEGORY:category name}}¦R}}¦offset={%DPL_offset:0%}¦count={%DPL_count:10%}¦page={{FULLPAGENAME}}}²\n |
||
</pre> |
</pre> |
||
{{note|'''Note:''' <code>%TOTALPAGES%</code> when used in <code>resultsheader</code> or <code>resultsfooter</code>, may cause both to intermittently appear/disappear. Currently, this template is only usable when there's a set number of expected results, such as pages in a category. <code><nowiki>{{formatnum:{{PAGESINCATEGORY:category name}}¦R}}</nowiki></code> is used to adjust for this.|warn}} |
{{note|'''Note:''' <code>%TOTALPAGES%</code> when used in <code>resultsheader</code> or <code>resultsfooter</code>, may cause both to intermittently appear/disappear. Currently, this template is only usable when there's a set number of expected results, such as pages in a category. <code><nowiki>{{formatnum:{{PAGESINCATEGORY:category name}}¦R}}</nowiki></code> is used to adjust for this.|warn}} |
Revision as of 05:54, 28 April 2022
This template can be used in a DPL3 statement to scroll through DPL result pages. The parameters set in this template, must have their URL parameter values set in the corresponding DPL3 statement per the usage example below.
Usage
The count
and offset
parameter are required to use this template in a DPL3 invocation:
|count = {%DPL_count:10%} |offset = {%DPL_offset:0%} |resultsheader = ²{Extension DPL scroll¦total={{formatnum:{{PAGESINCATEGORY:category name}}¦R}}¦offset={%DPL_offset:0%}¦count={%DPL_count:10%}¦page={{FULLPAGENAME}}}²\n |resultsfooter = ²{Extension DPL scroll¦total={{formatnum:{{PAGESINCATEGORY:category name}}¦R}}¦offset={%DPL_offset:0%}¦count={%DPL_count:10%}¦page={{FULLPAGENAME}}}²\n
The output of the URL link generated, is equivalent to putting the following in a browser (for the page name that has the above required parameters):
https://mywiki.com/wiki/Pagename&DPL_count=10&DPL_offset=10