Anonymous user
General usage and invocation syntax: Difference between revisions
class=
(Fix typo I missed) |
imported>FrozenPlum (class=) |
||
Line 2:
{{DPL manual|section=General usage and invocation syntax}}
{{tocright}}
'''DynamicPageList3 (DPL3)''' can be used as a '''parser extension''' (<small><code><nowiki><
;Sample output
Line 12:
==Parser extension (tag) method==
The following example would probably be used directly on an article page, but could also be included as part of a template. Parser extensions define a specific tag (in this case <code><nowiki><
;Example syntax
<blockquote><pre><nowiki>
<
category = cat1|cat2
# only pages which contain a link to myPage
linksto = myPage
</
</nowiki></pre></blockquote>
Line 106:
==URL parameters==
DPL understands a couple of parameters which can be passed via a URL specification. These URL-parameters all start with DPL_:
* <code>DPL_count</code>:
* <code>DPL_offset</code>:
* <code>DPL_refresh</code>:
* <code>DPL_fromTitle</code>:
* <code>DPL_toTitle</code>:
* <code>DPL_findTitle</code>: Influences the {{DPL|titlegt}} parameter, specifies the page name to start with that is passed to {{DPL|titlegt}}.
* <code>DPL_arg1, DPL_arg2, .. DPL_arg5</code>:
<pre><nowiki> http://mywebsite/mywiki/index.php?title=MyPage&DPL_offset=20 </nowiki></pre>
▲would display ''MyPage'' and set the offset parameter to a value of ''20''.
Within the DPL statement, you can access URL parameters via
Line 125:
In this case, DPL will use 'yyy' if the parameter DPL_xxx is not specified on the URL command line.
'''Note:''' There is a template called [[Template:Extension DPL scroll]] which uses <code>DPL_offset</code> and <code>DPL_count</code> to provide a generic page scrolling method for huge result sets, where there is an expected number of results.
==Syntax used in this manual==
Line 140:
As mentioned before, DPL3 will insert its output exactly at the position where you placed the DPL3 call. This means that you can put wiki syntax around your DPL call, like e.g.,:
<pre><nowiki>
{| class="wikitable"
|a table field
|<
linksto=myPage
</
|-
|another table field
Line 222:
* DPL_offset
* DPL_refresh (a value of 'yes' will purge the DPL cache)
* DPL_fromTitle
* DPL_toTitle
* DPL_findTitle
* DPL_scrolldir (will be used to influence sort order, can be 'up' or 'down')
|