Examples/Parameter: debug (example 1): Difference between revisions
imported>FrozenPlum m (FrozenPlum moved page Examples/Parameter: debug (example 1) to Examples/Module: debug (example 1): Forgot my prefix needed to be different) |
imported>FrozenPlum m (Bit of a rewrite now that it's modified) |
||
Line 6:
==Example==
This statement sets the DPL3 <code>debug</code> output to <code>''5''</code>, which outputs the full wikitext result of the query after listing the extension itself. The
<pre>
|
Revision as of 02:16, 21 April 2023
Example
This statement sets the DPL3 debug
output to 5
, which outputs the full wikitext result of the query after listing the extension itself. The query selects one article from Category:Fruit examples, puts the title in the first column automatically (default behavior), then includes the "Fruit-Infobox" template's "grows" parameter value, in the second column. The table
statement sets the table styles and header text. The first argument of tablerow
corresponds to, and formats the second column content to bold, using %%
to position the value precisely within the formatting.
{{#dpl: |debug=5 |category = Fruit examples |include = {Fruit-Infobox}:grows |table = class="wikitable sortable",Page,The "grows"<br>parameter value |tablerow = <b>%%</b> |count = 1 }}
Result
Debug 5:
{{#dpl:
|debug=5
|category = Fruit examples
|include = {Fruit-Infobox}:grows
|table = class="wikitable sortable",Page,The "grows"
parameter value
|tablerow = %%
|count = 1
}}
Without debug (for comparison purposes):
{{#dpl:
|category = Fruit examples
|include = {Fruit-Infobox}:grows
|table = class="wikitable sortable",Page,The "grows"
parameter value
|tablerow = %%
|count = 1
}}