DPL Extension Testing Ground: Difference between revisions
Gorgonzola (talk | contribs) |
Gorgonzola (talk | contribs) Testing table of abilities with DPL pulling from multiple articles. |
||
| Line 1: | Line 1: | ||
{{TOCright}} | |||
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]. | ||
| Line 50: | Line 51: | ||
{{ #dpl: | {{ #dpl: | ||
| uses = Template:MAP infobox | | uses = Template:MAP infobox | ||
}} | |||
==Ability table (work in progress)== | |||
{{Ability table | |||
| category = Fire Magic abilities | |||
}} | }} | ||
Revision as of 22:01, 26 October 2014
This page is used for testing the DPL extension (it should be an orphan page). See DPL Manual.
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.
- ¶ or \n 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}}}
}}
Debugging
resultsheader=«pre»«nowiki» resultsfooter=«/nowiki»«/pre»
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.
{{ #dpl: | titlematch = Game updates/2014-% | ordermethod = title | order = descending }}
dplreplace
This could be useful... (manual)
{{#dplreplace:abrakadabra|ab|AB}}
{{#dplreplace:abrakadabra|ab|AB}}
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).
{{ #dpl: | uses = Template:MAP infobox }}
Ability table (work in progress)
{{ #dpl: | category = Fire Magic abilities | | uses = Template:Ability infobox | mode = userformat | allowcachedresults = false | include = {Ability infobox}/concise row format | format = ¶{¦ class="sortable table" style="" ¶¦- style="background:#ece;" ¶! Name ¶! Level ¶! class="unsortable" ¦ Power Cost ¶! class="unsortable" ¦ Reuse Time ¶! class="unsortable" ¦ Damage ¶! class="unsortable" ¦ Description ¶! class="unsortable" ¦ Special ,,,¶¦} | secseparators = ¶¦- }}