Anonymous user
Other parameters: Difference between revisions
Add more examples
imported>FrozenPlum m (Fix formatting in a few places, still need to split out some examples but first will have to test the fix to %TOTALPAGES% used for scroll behaviour) |
imported>FrozenPlum (Add more examples) |
||
(One intermediate revision by the same user not shown) | |||
Line 24:
'''Example:'''<br><br><!-- transclude example from subpage-->{{#lsth:Examples/
{{ViewTest|Examples|
'''Result:'''<br><br><!-- transclude example from subpage-->{{#lsth:Examples/Parameter: debug (example 1)|Result}}
Line 47 ⟶ 49:
'''Notes:'''
* All queries are cached by default '''to reduce server load''', as generally articles do not change often enough to require updating every page load.
* If immediate updates are required every page load, such as for displaying {{DPL|scroll}} navigation via {{DPL|URL parameters}}, then set this parameter to false.
* Cache period is handled by the <code>{{DPL|cacheperiod}}</code> parameter.
Line 229 ⟶ 234:
If no wiki text is given, the command is ignored. Otherwise, DPL3 outputs the wiki text and exits immediately.
Note that the wiki text may be a parser function call which evaluates to an empty string.
'''Example:'''<br><br><!-- transclude example from subpage-->{{#lsth:Examples/Parameter: execandexit (example 1)|Example}}
{{ViewTest|Examples|Parameter: execandexit (example 1)}}
'''Result:'''<br><br><!-- transclude example from subpage-->{{#lsth:Examples/Parameter: execandexit (example 1)|Result}}
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 [[mw:Extension:Variables|Variables]] extension is installed) or via #dplvar.
Line 235 ⟶ 245:
'''Example:'''<br><br><!-- transclude example from subpage-->{{#lsth:Examples/Parameter: execandexit (example 2)|Example}}
{{ViewTest|Examples|Parameter: execandexit (example 2)}}
'''Result:'''<!-- transclude example from subpage-->{{#lsth:Examples/Parameter: execandexit (example 2)|Result}}
'''See also:''' [[Template:
{{note|'''Note:''' <code>execandexit</code> acts like a short-circuit evaluation. This means, for example, that successive statements to influence caching behavior (like <code>{{DPL|allowcachedresults}}</code>) are not interpreted.}}
|