Examples/Parameter: format (example 4): Difference between revisions
< Examples
Content deleted Content added
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 would list items in the ''File'' namespace, limited to a count of..." |
(No difference)
|
Revision as of 04:08, 10 April 2022
Example
This would list items in the File namespace, limited to a count of 3, formatted as a gallery using the Startall
and Endall
positions of the format syntax to specify gallery start and end. The Start
position in the syntax specifies the %PAGE%
(in this case the file page) followed by a line break \n
to populate the MediaWiki gallery syntax needed. The Start
and End
(empty, not required) parts of the syntax are applied to each result in the list, so the file page name is fetched for each image and put on a new line to complete the gallery statement. See gallery syntax on MediaWiki Wiki for more information on gallery syntax.
<dpl> namespace = File count = 3 format = <gallery mode="packed" widths="80px" heights="80px">,%PAGE%\n,,</gallery> </dpl>
Result
<dpl>
namespace = File count = 3
format =
</dpl>