Other parameters: Difference between revisions

m (clean up, typos fixed: won´t → won't, fuction → function)
Line 316:
Note that the wiki text may be a parser function call which evaluates to an empty string.
 
The special word ''geturlargs'' can be used as a wiki text to transform URL arguments starting with <code>DPL_</code> into variables which can then be accessed via #var (if the Variables extension is installed) or via #dplvar.
Purpose:
Line 323:
 
A typical use would look like this (note the double pipe symbols within the #if.
Calling the following page with &catDPL_cat=Country would list countries, omitting the &cat parameter would trigger the error text mnessagemessage (without DPL going to the database):
<pre><nowiki>
{{#dpl:execandexit=geturlargs}}
{{#dpl:
| execandexit = {{#if:{{#dplvar:catDPL_cat}}||please specify a category via &catDPL_cat= in the URL!}}
| resultsheader = pages in category {{#dplvar:catDPL_cat}}:\n
| noresultsheader = there are no pages in category {{#dplvar:catDPL_cat}}.\n
| count = 5
| category = {{#dplvar:catDPL_cat}}
}}
</nowiki></pre>
Anonymous user