Jump to content
This wiki has been automatically closed because there have been no edits or log actions made within the last 60 days. If you are a user (who is not the bureaucrat) that wishes for this wiki to be reopened, please request that at Requests for reopening wikis. If this wiki is not reopened within 6 months it may be deleted. Note: If you are a bureaucrat on this wiki, you can go to Special:ManageWiki and uncheck the "Closed" box to reopen it.

Examples/Parameter: format (example 4): Difference between revisions

m
I see soooo many fixes to my wording and examples that need doing
imported>FrozenPlum
m (Update to parser function syntax because again, it contains a complication that needs to be well understood in order to be used successfully. The general use and syntax page only describes escaping being necessary for "extensions", it is also required for gallery syntax.)
imported>FrozenPlum
m (I see soooo many fixes to my wording and examples that need doing)
Line 1:
<noinclude>{{noedit}}</noinclude><!--
<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,
Line 6:
==Example==
 
This would list items in the ''File'' namespace, limited to a count of 3, formatted as a gallery using the <code>''Startall''</code> and <code>''Endall''</code> positionsarguments of the {{DPL|format}} syntax to specify gallery start and end. Note that when DPL3 parser function syntax is used to create a gallery, which uses tag syntax, the <code><</code> and <code>></code> characters must be escaped, so each is replaced by <code>«</code> and <code>»</code> respectively. The <code>''Start''</code> position in the syntax specifies the <code>%PAGE%</code> (in this case the file page) followed by a line break <code><nowiki>\n</nowiki></code> to populate the MediaWiki gallery syntax needed. The <code>''Start''</code> and <code>''End''</code> (empty,arguments notare required) parts of the syntax arethen applied to each result in the list, so the file page namenames isare fetched for each image, and put on a new line to complete the gallery statement. See [[mw:Help:Images#Gallery syntax|gallery syntax]] on MediaWiki Wiki for more information on gallery syntax.
 
 
'''Note:''' When DPL3 parser function syntax is used to create a gallery, the <code><</code> and <code>></code> characters must be replaced by <code>«</code> and <code>»</code> respectively (to escape them).
 
<pre>
{{#dpl:
|namespace = File
|count = 3
|format = «gallery mode="packed" widths="80px" heights="80px"»,%PAGE%\n,,«/gallery»
|count = 3
}}
</pre>
Line 20 ⟶ 23:
{{#dpl:
|namespace = File
|count = 3
|format = «gallery mode="packed" widths="80px" heights="80px"»,%PAGE%\n,,«/gallery»
|count = 3
}}
<noinclude>
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.