Template:Delete3: Difference between revisions

From DynamicPageList3 Manual
Content added Content deleted
imported>FrozenPlum
No edit summary
imported>FrozenPlum
(Update to be correct now that it's working)
Line 22: Line 22:
|count = {%DPL_count:10%}
|count = {%DPL_count:10%}
|offset = {%DPL_offset:0%}
|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
|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={{formatnum:{{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>
</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>{{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:
<!-- The old working example, prior to (much needed) cache changes to drastically improve the performance of DPL3:
Line 31: Line 32:


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):
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.com/wiki/Pagename&DPL_count=10&DPL_offset=10
<pre>https://mywiki.miraheze.org/w/index.php?title=Mypage&DPL_count=3&DPL_offset=3
</pre>
</pre>



Revision as of 07:12, 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={{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
Note: %TOTALPAGES% when used in resultsheader or resultsfooter, 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. {{PAGESINCATEGORY:Category name|R}} is used to adjust for this.


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.miraheze.org/w/index.php?title=Mypage&DPL_count=3&DPL_offset=3