Difference between revisions of "DPL Extension Testing Ground"
From Project: Gorgon Wiki
Gorgonzola (talk | contribs) m |
Gorgonzola (talk | contribs) (Summarizing notes from DPL documentation.) |
||
| Line 1: | Line 1: | ||
This page is used for testing the DPL extension (it should be an orphan page). See [http://semeb.com/dpldemo/index.php?title=DPL:Manual DPL Manual]. | This page is used for testing the DPL extension (it should be an orphan page). See [http://semeb.com/dpldemo/index.php?title=DPL:Manual DPL Manual]. | ||
| + | |||
| + | ==DPL Cheatsheet== | ||
| + | |||
| + | ===Invocation=== | ||
| + | We can use <nowiki><dpl></nowiki> or <nowiki>{{ #dpl: ... }}</nowiki> to invoke DPL (Dynamic Page Lists). The latter is more powerful: | ||
| + | * Magic words like <nowiki>{{PAGENAME}}</nowiki> or <nowiki>{{CURRENTDAY}}</nowiki> '''can be used'''. | ||
| + | * Template calls like <nowiki>{{{some template}}}</nowiki> '''can be used''' as parameters. | ||
| + | * Parser function calls like <nowiki>{{#if:...|...|...}}</nowiki> '''can be used''' within arguments. | ||
| + | |||
| + | ===Special characters and escaping=== | ||
| + | Wiki characters must be escaped in the DPL arguments: | ||
| + | * Use <nowiki>{{!}}</nowiki> (ie. [[:Template:!]]) or the special symbol ¦ to escape the pipe character. | ||
| + | * ¶ must be used to insert a linefeed character where linefeeds are required by the wiki formatting. | ||
| + | |||
| + | Example of using an escape pipe character: | ||
| + | <pre> | ||
| + | {{#dpl: | ||
| + | |category = cat1¦cat2 | ||
| + | |linksto = {{{1}}} | ||
| + | }} | ||
| + | </pre> | ||
==Using Titlematch== | ==Using Titlematch== | ||
Revision as of 11:44, 25 October 2014
This page is used for testing the DPL extension (it should be an orphan page). See DPL Manual.
Contents
DPL Cheatsheet
Invocation
We can use <dpl> or {{ #dpl: ... }} to invoke DPL (Dynamic Page Lists). The latter is more powerful:
- Magic words like {{PAGENAME}} or {{CURRENTDAY}} can be used.
- Template calls like {{{some template}}} can be used as parameters.
- Parser function calls like {{#if:...|...|...}} can be used within arguments.
Special characters and escaping
Wiki characters must be escaped in the DPL arguments:
- Use {{!}} (ie. Template:!) or the special symbol ¦ to escape the pipe character.
- ¶ must be used to insert a linefeed character where linefeeds are required by the wiki formatting.
Example of using an escape pipe character:
{{#dpl:
|category = cat1¦cat2
|linksto = {{{1}}}
}}
Using Titlematch
Pulling all news article for 2014 only. Note! : titlematch can create inefficient queries, and should not be necessary if categories can do it.
- Game updates/2014-12-20
- Game updates/2014-12-15
- Game updates/2014-12-06
- Game updates/2014-12-05
- Game updates/2014-12-02
- Game updates/2014-11-27
- Game updates/2014-11-25
- Game updates/2014-11-24
- Game updates/2014-11-16
- Game updates/2014-11-08
- Game updates/2014-11-04
- Game updates/2014-11-01
- Game updates/2014-10-27
- Game updates/2014-10-25
- Game updates/2014-10-23
- Game updates/2014-10-22
- Game updates/2014-10-21
- Game updates/2014-10-09
- Game updates/2014-10-06
- Game updates/2014-10-04
- Game updates/2014-09-23
- Game updates/2014-09-20
- Game updates/2014-09-15
- Game updates/2014-09-07
- Game updates/2014-09-06
- Game updates/2014-09-01
dplreplace
This could be useful... (manual)
{{#dplreplace:abrakadabra|ab|AB}}
ABrakadABra
uses (pulling pages using certain templates)
This is the main way we could handle skills/recipes tables with DPL and templating. WORK IN PROGRESS (trying to figure out the templating of table rows with DPL).