Examples/Parameter: debug (example 1): Difference between revisions

From DynamicPageList3 Manual
Content added Content deleted
imported>FrozenPlum
(Add debug example)
 
imported>FrozenPlum
 
(3 intermediate revisions by the same user not shown)
Line 6: Line 6:
==Example==
==Example==


This statement sets the DPL3 debug output to <code>''5''</code> which outputs the full wikitext result of the query after listing the extension itself. The queryselects 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 <code>table</code> statement sets the table styles and header text. The first argument of <code>tablerow</code> corresponds to, and formats, the second column; setting the cell background style (green) and then uses <code>%%</code> to position the value ''after'' the formatting.
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 query selects one article from [[:Category:Fruit examples]], puts the title in the first column automatically (default behavior), then includes the "[[Template:Fruit-Infobox|Fruit-Infobox]]" template's "grows" parameter value, in the second column. The <code>table</code> statement sets the table styles and header text. The first argument of <code>tablerow</code> corresponds to, and formats the second column content to bold, using <code>%%</code> to position the value precisely within the formatting.


<pre>
<pre>
Line 20: Line 20:


==Result==
==Result==
'''Debug 5:'''
'''Debug 5 output:'''
{{#dpl:
{{#dpl:
|debug=5
|debug=5
Line 29: Line 29:
|count = 1
|count = 1
}}
}}
'''Without debug (for comparison purposes):'''
'''Output without debug (for comparison):'''
{{#dpl:
{{#dpl:
|category = Fruit examples
|category = Fruit examples

Latest revision as of 06:13, 21 April 2023

Please do not edit this page unless you're wanting to edit the manual itself, it is an example included in the manual.

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 output: {{#dpl: |debug=5 |category = Fruit examples |include = {Fruit-Infobox}:grows |table = class="wikitable sortable",Page,The "grows"
parameter value |tablerow = %% |count = 1 }} Output without debug (for comparison): {{#dpl: |category = Fruit examples |include = {Fruit-Infobox}:grows |table = class="wikitable sortable",Page,The "grows"
parameter value |tablerow = %% |count = 1 }}