Anonymous user
Other parameters: Difference between revisions
Add more examples
imported>FrozenPlum m (Update link and example display) |
imported>FrozenPlum (Add more examples) |
||
Line 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 231 ⟶ 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 237 ⟶ 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}}
Line 254 ⟶ 255:
{{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.}}
|