Jump to content

Examples/Parameter: scroll (example 2)

From DynamicPageList4 Manual
Please do not edit this page unless you're wanting to edit the manual itself, it is an example included in the manual.

Example

[edit source]

This lists pages from the category Fruit examples, the count and empty offset displays the first 3 articles using Scroll or URL syntax, and scroll parameter being enabled fills the url parameter values. The resultsheader and footer use a helper template (Template:DPL4 scroll) to create scroll navigation, composed of the magic word ({{PAGESINCATEGORY:Category}}) and some parameters are fed to that template, so it can determine total pages, count, and amount of offset. allowcachedresults prevents caching, to prevent the need for manual purge to view the results.

Code
{{#dpl:execandexit  = geturlargs}}
{{#dpl:
|category           = Fruit examples
|count              = {%DPL_count:3%}
|offset             = {%DPL_offset:0%}
|scroll             = yes
|resultsheader      = ²{DPL4 scroll¦total={{PAGESINCATEGORY:Fruit examples|R}}¦offset={%DPL_offset:0%}¦count={%DPL_count:3%}¦page={{FULLPAGENAME}}}²\n
|resultsfooter      = ²{DPL4 scroll¦total={{PAGESINCATEGORY:Fruit examples|R}}¦offset={%DPL_offset:0%}¦count={%DPL_count:3%}¦page={{FULLPAGENAME}}}²\n
|allowcachedresults = false
}}
Result


1..34..6(8 total)
1..34..6(8 total)
Cookies help us deliver our services. By using our services, you agree to our use of cookies.