Other parameters: Difference between revisions

repaired cross-reference links
m (→‎cacheperiod: clean up, replaced: [[zh:Extension::{{subst:BASEPAGENAME}}]] → [[zh:扩展:{{subst:BASEPAGENAME}}]])
(repaired cross-reference links)
Line 103:
The size of the form fields will dapt to the size of the displayed content.
 
<!--To make the use of the <code>updaterules</code> feature easier we provide a [[Template:Bulk Update|special user interface]].
Note: This template is deliberately not present, as it can apparently alter lots of wiki content. The line above is retained as a comment since it was part of the original DPL documentation. -->
 
''text'' is plain text; ''replacement'' is text which may contain references (like \1) to the matching ''pattern'' (provided that this pattern contains match groups).
Line 205 ⟶ 206:
;reset=links: will throw away all references to other pages, i.e. links contained in included contents and links like 'Q Link' will be ignored. This means that all links can be used in the normal "FORWARD" way, but no "BACKLINKS" are available for them.
 
If you want to avoid the above described effect of <code>reset</code> on your 'own' links you can use <code>[[{{dpl3|eliminate]]</code>}}. But you should know that ''eliminate'' is rather expensive in terms of computer power as it does a second parse for all included contents.
 
<u>In parser fuction mode ('''<nowiki>{{#DPL:....}}</nowiki>'''):</u>
Line 216 ⟶ 217:
As you see, using <code>reset</code> in parser function mode will clear everything regardless whether it comes from included contents or whether it is direct part of the document containing the DPL query.
 
If you want to avoid the above described effect of <code>reset</code>, you can use <code>[[{{dpl3|eliminate]]}}</code>. But you should know that ''eliminate'' is rather expensive in terms of computing power as it does a second parse for all included contents. The extra parser step is conducted as soon as you specify <code>eliminate</code>. In terms of extra processing needed it does not make a difference whether you specify one or more arguments for the 'eliminate' command.
 
If you have '''more than one DPL query''' in a document the effects will depend on the exact mode (parser extension or parser function mode), on the sequence of the statements and on the presence of 'reset' or 'eliminate' statements in each of the queries and on their individual arguments. As this is a very rare case we only give a simple rule of thumb here: Once you have used 'reset' in parser function mode or 'reset=links' in parser extension mode the effect of these statements will dominate the rest.
Line 234 ⟶ 235:
 
As a side effect of using <code>reset=all</code> your article will not appear in a category even if you literally assign it to one.
The <code>fixcategory</code> allows you to make a category assignment which is not blocked by the [[{{dpl3|reset]]}} command.
 
==eliminate==
Line 254 ⟶ 255:
* <code>all</code> &mdash; a synonym for all of the above
 
The output of a DPL statement typically creates links to all pages which are part of the result set. The inclusion of contents from other pages via DPL (using <code>[[{{dpl3|include]]</code>}}) normally has these consequences:
* the page containing the DPL query becomes part of the categories of the transcluded page
* shares ('adopts') their use of templates
Line 264 ⟶ 265:
The <code>eliminate</code> parameter will suppress all or some of the effects described above.
 
For further explanation see <code>[[{{dpl3|reset]]</code>}}.
 
Please note that the use of <code>eliminate</code> needs a considerable amount of extra computing power as it performs a second parser step for each included document.
Line 300 ⟶ 301:
DPL debug messages are translatable in <code>DynamicPageList2.i18n.php</code>. See also [[#Internationalization]].
 
'debug=1' will suppress warning messages (e.g. if the result set of a DPL query is empty). As an alternative, you can use the <code>[[{{dpl3|suppresserrors]]</code>}} statement.
 
==execandexit==
Line 336 ⟶ 337:
</nowiki></pre>
 
See also: [[Template:Extension DPL scroll]] and [[DPL Example 020]] and [[{{dpl3|Scrolling]]}}
 
Note <code>execandexit</code> acts like a short-circuit evaluation. This means, for example, that successive statements to influence caching behaviour (like [[{{dpl3|allowcachedresults]]}}) will not be interpreted.
 
==cacheperiod==
Anonymous user