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

From DynamicPageList3 Manual
Content added Content deleted
imported>FrozenPlum
(Created page with "<noinclude>{{note|Please '''do not edit''' this page unless you're wanting to edit the manual itself, it is an example included in the manual.|error}}</noinclude><!-- This is the example preloaded for testing, press "Show Preview" to see the example working (at the bottom of the page). If you save this page, it saves as a new section at the bottom of your '''User:Username/Sandbox''' --> ==Example== This will list articles in Category:Fruit examples using listsepar...")
 
imported>FrozenPlum
 
(5 intermediate revisions by the same user not shown)
Line 6: Line 6:
==Example==
==Example==


This will list articles in [[:Category:Fruit examples]] using listseparators to define a table with three columns and put a link to the article in the first column of each row. The <code>includepage</code> parameter specifies a template used on each page, along with parameter names to output results for.
This will list articles in [[:Category:Fruit examples]] using <code>listseparators</code> to define a table with three columns and put a link to the article in the first column of each row. The <code>includepage</code> parameter specifies a template used on each page, along with parameter names to output results for.


Secseparators is used to add more columns for each section found. There are two pairs for each transcluded section; the first element of each pair is a linefeed and a pipe/split-pipe (which define a new column in the table) and the second element of each pair is empty. Have a careful look at the <code>¶</code> symbols (<code>\n</code> can be used as an alternative). They always appear before a wiki syntax element which must be placed at the beginning of a new line. Thus, make sure that the wiki parser will understand them.
<code>secseparators</code> is used to add more columns for each section found. There are two pairs for each transcluded section; the first element of each pair is a linefeed and a pipe/split-pipe (which define a new column in the table) and the second element of each pair is empty. Have a careful look at the <code>¶</code> symbols (<code>\n</code> can be used as an alternative). They always appear before a wiki syntax element which must be placed at the beginning of a new line. Thus, make sure that the wiki parser will understand them.


'''Note:''' If an article does not contain a value for the parameter named "grows", it will result in an empty cell in the table.
'''Note:''' If an article does not contain a value for the parameter named "grows", it will result in an empty cell in the table.
Line 15: Line 15:
{{#dpl:
{{#dpl:
|category = Fruit examples
|category = Fruit examples
|listseparators = {¦ class="wikitable" ¶!Fruit ¶!Image Filename ¶!Grows on,¶¦-¶¦[[%PAGE%|%TITLE%]],,¶|}
|listseparators = {¦class="wikitable" ¶!Fruit ¶!Image Filename ¶!Grows on,¶¦-¶¦[[%PAGE%|%TITLE%]],,¶¦}
|includepage = {Fruit-Infobox}:image:grows
|includepage = {Fruit-Infobox}:image:grows
|secseparators = ¶¦,,¶¦,,
|secseparators = ¶¦,,¶¦,,
|count=8
|count=3
}}
}}
</pre>
</pre>



==Result==
==Result==
Line 27: Line 26:
{{#dpl:
{{#dpl:
|category = Fruit examples
|category = Fruit examples
|listseparators = {¦ class="wikitable" ¶!Fruit ¶!Image Filename ¶!Grows on,¶¦-¶¦[[%PAGE%|%TITLE%]],,¶|}
|listseparators = {¦class="wikitable" ¶!Fruit ¶!Image Filename ¶!Grows on,¶¦-¶¦[[%PAGE%|%TITLE%]],,¶¦}
|includepage = {Fruit-Infobox}:image:grows
|includepage = {Fruit-Infobox}:image:grows
|secseparators = ¶¦,,¶¦,,
|secseparators = ¶¦,,¶¦,,
|count=8
|count=3
}}
}}



Latest revision as of 23:51, 31 March 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 will list articles in Category:Fruit examples using listseparators to define a table with three columns and put a link to the article in the first column of each row. The includepage parameter specifies a template used on each page, along with parameter names to output results for.

secseparators is used to add more columns for each section found. There are two pairs for each transcluded section; the first element of each pair is a linefeed and a pipe/split-pipe (which define a new column in the table) and the second element of each pair is empty. Have a careful look at the symbols (\n can be used as an alternative). They always appear before a wiki syntax element which must be placed at the beginning of a new line. Thus, make sure that the wiki parser will understand them.

Note: If an article does not contain a value for the parameter named "grows", it will result in an empty cell in the table.

{{#dpl:
|category       = Fruit examples
|listseparators = {¦class="wikitable" ¶!Fruit ¶!Image Filename ¶!Grows on,¶¦-¶¦[[%PAGE%|%TITLE%]],,¶¦}
|includepage    = {Fruit-Infobox}:image:grows
|secseparators  = ¶¦,,¶¦,,
|count=3
}}

Result

{{#dpl: |category = Fruit examples |listseparators = {¦class="wikitable" ¶!Fruit ¶!Image Filename ¶!Grows on,¶¦-¶¦%TITLE%,,¶¦} |includepage = {Fruit-Infobox}:image:grows |secseparators = ¶¦,,¶¦,, |count=3 }}