Jump to content
This wiki has been automatically closed because there have been no edits or log actions made within the last 60 days. If you are a user (who is not the bureaucrat) that wishes for this wiki to be reopened, please request that at Requests for reopening wikis. If this wiki is not reopened within 6 months it may be deleted. Note: If you are a bureaucrat on this wiki, you can go to Special:ManageWiki and uncheck the "Closed" box to reopen it.

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 many casesOften, there is no need to have macro expansion within the parameter list.
* 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 point of viewperspective contains links to all pages it lists. If your DPL3 statement contains a "uses" clause, you will be astonished to find your own page in all results. The same happens with categories... In addition, there were technical problems with self referencing result sets (parser loop references, which seemed very hard to solve). So, it was decided to skip a self reference in the result set by default.
 
 
Line 109:
==Characters with special meaning==
 
SometimesOccasionally, it is necessary to use a character as "plain data" at a place where it normally has a syntactical meaning. MediaWiki is not very clean at character escaping in general. So, we had to define our own way in the jungle of "character escaping":
 
{| class="wikitable"
Line 115:
! DPL3 escape character !! MediaWiki character!! Typical use
|-
| align=center | <code>'''»'''</code> || align=center | &gt; || rowspan=2 | Call another MediaWiki extension into a parameter of a DPL3 call;, or create a gallery <code><nowiki><gallery></gallery></nowiki></code> using DPL3's ''parser function'' syntax.
|-
| align=center | <code>'''«'''</code> || align=center | &lt;
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 pagenamepage name. So, if you write something like <br><code><nowiki>[[%PAGE%|%TITLE%]]</nowiki></code>, DPL3 will create a hyperlink to an article.
 
 
Line 252:
mode=userformat
listseparators=a,b,c,d
is exactly the same as:
format=a,b,c,d
 
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.