Template:Delete3: Difference between revisions

From DynamicPageList3 Manual
Content added Content deleted
imported>FrozenPlum
(Update to be correct now that it's working)
imported>FrozenPlum
m (FrozenPlum moved page Template:DPL scroll to Template:Delete3)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<table><tr><td style="background-color: #f9f9f9; padding: .1em .7em .2em .7em;"><!--
<table><tr><td style="background-color: #f9f9f9; padding: .1em .7em .2em .7em;"><!--

-->{{#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 11: Line 10:


-->({{{total|0}}} total)}}<!--
-->({{{total|0}}} total)}}<!--

--></td></tr></table><noinclude>
--></td></tr></table><noinclude>
{{documentation}}

<!-- Add categories to the /doc subpage -->
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.

==Usage==
The <code>count</code> and <code>offset</code> parameter are required to use this template in a DPL3 invocation:

<pre>
|count = {%DPL_count:10%}
|offset = {%DPL_offset:0%}
|resultsheader = ²{Extension DPL scroll¦total={{PAGESINCATEGORY:Category name|R}}¦offset={%DPL_offset:0%}¦count={%DPL_count:10%}¦page={{FULLPAGENAME}}}²\n
|resultsfooter = ²{Extension DPL scroll¦total={{PAGESINCATEGORY:Category name|R}}¦offset={%DPL_offset:0%}¦count={%DPL_count:10%}¦page={{FULLPAGENAME}}}²\n
|allowcachedresults = false
</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>{{PAGESINCATEGORY:Category name|R}}</nowiki></code> is used to adjust for this.|warn}}

<!-- The old working example, prior to (much needed) cache changes to drastically improve the performance of DPL3:
²{DPL scroll¦total=%TOTALPAGES%¦offset={%DPL_offset:0%}¦count={%DPL_count:100%}¦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):
<pre>https://mywiki.miraheze.org/w/index.php?title=Mypage&DPL_count=3&DPL_offset=3
</pre>

<!-- Template categories/interwikis here -->
[[Category:Templates]]
[[Category:Example templates]]
</noinclude>
</noinclude>

Latest revision as of 05:47, 21 April 2023

[create | purge]Template Documentation
This template has no documentation. If you know how to use this template, please create it.