Template:DPL scroll
From Dragon Mania Legends (DML) Wiki
Template documentation |
---|
Note: portions of the template sample may not be visible without values provided. |
View or edit this template's documentation. (About template documentation) |
Example(s)
{{DPL scroll|total={{PAGESINCATEGORY:Fire (Element)|R}}|offset={%DPL_offset:0%}|count={%DPL_count:{{{count|5}}}%}|page={{FULLPAGENAME}} }}
OR
{{DPL scroll|total={{PAGESINCATEGORY:Fire (Element)|R}}|offset=0|count=5|page=Category:Fire (Element)}}
gives results like (this is not a live query/working example):
1 - 56 - 10 (284 total) |
See Also
{{Pagination-DPL3}}
, the template that feeds values to this one, to create theresultsheader
andresultsfooter
pagination number/range entries using DPL3 variables.
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 = ²{DPL scroll¦total={{PAGESINCATEGORY:Category name|R}}¦offset={%DPL_offset:0%}¦count={%DPL_count:200%}¦page={{FULLPAGENAME}}}²\n |resultsfooter = ²{DPL scroll¦total={{PAGESINCATEGORY:Category name|R}}¦offset={%DPL_offset:0%}¦count={%DPL_count:200%}¦page={{FULLPAGENAME}}}²\n
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://www.dragon-mania-legends.wiki/w/index.php?title=Mypage&DPL_count=3&DPL_offset=3
This template can be used in a DPL3 statement's "resultsheader" and/or "resultsfooter" to create number range buttons 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.
Parameter | Description | Type | Status | |
---|---|---|---|---|
(DPL3 %TOTALPAGES% or {{PAGESINCATEGORY:}}) total | total | Used by DPL3 to create scrolling navigation | String | required |
(DPL3) count | count | Used by DPL3 to determine how many pages to paginate by
| Number | required |
(DPL3) offset | offset | Used by DPL3 to determine page offset for pagination, number must match "count"
| Number | required |
(DPL3 %PAGE% or {{PAGENAME}}) page | page | Used by DPL3 to specify previous/next page star/end | String | optional |