Examples/Parameter: format (example 4): Difference between revisions
< Examples
imported>FrozenPlum m (I see soooo many fixes to my wording and examples that need doing) |
imported>FrozenPlum m (FrozenPlum moved page Controlling output format/Parameter: format (example 4) to Examples/Parameter: format (example 4): Simplifying how things are structured) |
(No difference)
|
Revision as of 23:51, 31 March 2023
Example
This would list items in the File namespace, formatted as a gallery using the Startall
and Endall
arguments of the format syntax to specify gallery start and end. The Start
and End
arguments are then applied to each result, so the file page names are fetched for each image, and put on a new line to complete the gallery statement.
Note: When DPL3 parser function syntax is used to create a gallery, the <
and >
characters must be replaced by «
and »
respectively (to escape them).
{{#dpl: |namespace = File |format = «gallery mode="packed" widths="80px" heights="80px"»,%PAGE%\n,,«/gallery» |count = 3 }}
Result
{{#dpl: |namespace = File |format = «gallery mode="packed" widths="80px" heights="80px"»,%PAGE%\n,,«/gallery» |count = 3 }}