Anonymous user
General usage and invocation syntax: Difference between revisions
m
Minor corrections from running editing assistive software over
imported>FrozenPlum (Undo revision 2464 by FrozenPlum (talk) was trying to figure out a problem with another page's display from this one.) |
imported>FrozenPlum m (Minor corrections from running editing assistive software over) |
||
Line 16:
==Syntax used in this manual==
Most examples in this manual typically use the parser function-based syntax, <code><nowiki>{{#dpl:}}</nowiki></code> given it is the more flexible syntax. Examples are wrapped in <code><nowiki><pre></pre></nowiki></code> tags, so the plain wikitext used to create a result can be seen without rendering the result itself.
Most of the manual deals with the explanation of individual parameters. This is independent of the choice between the two variants described above. So, if you read something like
Line 52:
* Generally the syntax looks fairly simple and intuitive as it doesn't contain special characters (except for the two embracing tags).
* Tag case doesn't matter, so it can also be written <code><nowiki><dpl></nowiki></code>.
*
* In the example above, the pipe character (which is used to define a logical OR between the two categories) can be written as it is. The name of the page (''myPage''), however, must be a hard-coded constant.
Line 98:
==Special note on ''Self References''==
In principle, a DPL3 query could be written in a way that the page containing the query (or the page including a template which contains the query) would be part of the result set. Experience in the past has shown that in some cases this leads to unwanted effects. For instance, the page containing the query from a MediaWiki
Line 109:
==Characters with special meaning==
{| class="wikitable"
Line 115:
! DPL3 escape character !! MediaWiki character!! Typical use
|-
| align=center | <code>'''»'''</code> || align=center | > || rowspan=2 | Call another MediaWiki extension into a parameter of a DPL3 call
|-
| align=center | <code>'''«'''</code> || align=center | <
Line 246:
==Variable replacement in ''mode=userformat''==
When <code>mode=userformat</code> is selected, DPL3 will not output anything by default; instead, it will look for variables in your parameter input (''listseparators, secseparators, multisecseparators, tablerow'') which it will replace by their corresponding values. For example, <code>%TITLE%</code> will be replaced by the title of an article, <code>%PAGE%</code> will be replaced by the
Line 252:
mode=userformat
listseparators=a,b,c,d
is
format=a,b,c,d
|