Difference between revisions of "Image galleries with DPL"
From Organic Design wiki
m (→All article in Category:Caterpillars ordered by date) |
m (→Only green caterpillars ordered by name) |
||
Line 10: | Line 10: | ||
<div style="clear:both"></div> | <div style="clear:both"></div> | ||
− | == | + | == Example 2: Green caterpillars ordered by name == |
This is a variation of the query which restricts the results to only images containing the word "green" in the title, and uses the default alphabetical order. | This is a variation of the query which restricts the results to only images containing the word "green" in the title, and uses the default alphabetical order. | ||
{{code|<pre>{{#dpl:category=Caterpillars|namespace=File|titleregexp=green|format=,²{DPLGallery¦%TITLE%}²,,}}</pre>}} | {{code|<pre>{{#dpl:category=Caterpillars|namespace=File|titleregexp=green|format=,²{DPLGallery¦%TITLE%}²,,}}</pre>}} |
Revision as of 22:29, 18 November 2014
This is an example of how to create image galleries from specific selections of images using DPL. The Resulting lists of articles selected by DPL are rendered through Template:DPLGallery which simply renders the image within a div with a title below it and CSS then does the layout and style for the gallery look and feel.
Example 1: All articles in Category:Caterpillars ordered by date
The following wikitext...
produces this gallery...
Example 2: Green caterpillars ordered by name
This is a variation of the query which restricts the results to only images containing the word "green" in the title, and uses the default alphabetical order.