Examples/Parameter: execandexit (example 2)

From DynamicPageList3 Manual
Revision as of 08:17, 21 April 2023 by imported>FrozenPlum (Make the next execandexit example into a working example that both sets and uses dplvar, so the example makes sense and populates results)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Please do not edit this page unless you're wanting to edit the manual itself, it is an example included in the manual.

Example

{{#dpl:execandexit=geturlargs}}
{{#dplvar:set|DPL_cat|Category:Dessert examples}}
{{#dpl: 
 | execandexit     = {{#if:{{#dplvar:DPL_cat}}||please specify a category via &DPL_cat= in the URL!}}
 | resultsheader   = Pages in <i>{{#dplvar:DPL_cat}}</i>:\n
 | noresultsheader = There are no pages in <i>{{#dplvar:DPL_cat}}</i>.\n
 | count           = 2
 | category        = {{#dplvar:DPL_cat}}
}}

Result

{{#dpl:execandexit=geturlargs}} {{#dplvar:set|DPL_cat|Category:Dessert examples}} {{#dpl:

| execandexit     = 
| resultsheader   = Pages in {{#dplvar:DPL_cat}}:\n
| noresultsheader = There are no pages in {{#dplvar:DPL_cat}}.\n
| count           = 2
| category        = {{#dplvar:DPL_cat}}

}}