Examples/Parameter: multisecseparators (example 1): Difference between revisions
imported>FrozenPlum mNo edit summary |
imported>FrozenPlum m FrozenPlum moved page Controlling output format/Parameter: multisecseparators (example 1) to Examples/Parameter: multisecseparators (example 1): Simplifying how things are structured |
||
(2 intermediate revisions by the same user not shown) | |||
Line 9:
<pre>
}}
</pre>
==Result==
}}
<noinclude>
[[Category:Setting the basic output mode]]
|
Latest revision as of 23:51, 31 March 2023
Example
This will create a list of articles in Category:Primary Module (manual pages) that don't have "volume" or "page selection" in the title, and that use the "DPL parameter" template. It includes the page name (linked to the page) and includes the values of the "name" and "purpose" parameters (from the "dpl parameter" template) used on each page, with included "purpose" text limited to a count of 50 characters. Since the "DPL parameter" template is used multiple times on the same article, it lists the first and then each subsequent template use with its corresponding values. The listseparators
prameter sets the table wikitext along with an extra row between seprate articles colored dark (navy), secseparators
is used to add more columns for each section found and color the first instance of template use orange, and since multisecseparators
puts a tag between multiple transcluded parts which refer to (use) the same template or chapter, it colors the rest of the inclusions of the "dpl parameter" template values, after the first, to (light) blue.
{{#dpl: |category = Primary Module |nottitlematch = %volume%¦%page selection% |uses = Template:DPL Parameter |include = {DPL manual}:[[%PAGE%]],{dpl parameter}:name:purpose[50] |mode = userformat |listseparators = ¶{¦class="wikitable sortable" ¶!colspan=3¦Fields cannot be formatted within the include¶¦-¶!Page ¶!Name ¶!Purpose,¶¦-,¶¦-¶¦class="dpl-dark-background" colspan=3¦¶¦-,¶¦} |secseparators = ¶¦,,¶¦class="dpl-orange-background"¦ |multisecseparators = ,¶¦-¶¦¶¦class="dpl-blue-background"¦ }}
Result
{{#dpl: |category = Primary Module |nottitlematch = %volume%¦%page selection% |uses = Template:DPL Parameter |include = {DPL manual}:%PAGE%,{dpl parameter}:name:purpose[50] |mode = userformat |listseparators = ¶{¦class="wikitable sortable" ¶!colspan=3¦Fields cannot be formatted within the include¶¦-¶!Page ¶!Name ¶!Purpose,¶¦-,¶¦-¶¦class="dpl-dark-background" colspan=3¦¶¦-,¶¦} |secseparators = ¶¦,,¶¦class="dpl-orange-background"¦ |multisecseparators = ,¶¦-¶¦¶¦class="dpl-blue-background"¦ }}