Difference between revisions of "Template:File Gallery"
| Line 5: | Line 5: | ||
* ''sort'': property or property list for sorting; default is "File Year" | * ''sort'': property or property list for sorting; default is "File Year" | ||
* ''limit'': max size; default is 40 | * ''limit'': max size; default is 40 | ||
| − | </noinclude><includeonly>{{ | + | </noinclude><includeonly>{{#if: |
| + | {{#ask: {{{1|}}} | ||
| + | | {{#if: {{{caption|}}} | ?{{{caption}}} }} | ||
| + | | sort={{#if: {{{sort|}}} | {{{sort}}} | File Year }} | ||
| + | | limit=1 | ||
| + | }} | ||
| + | | {{H2|{{#if: {{{title|}}} | {{{title}}} | Related Files}}}} | ||
| − | + | {{#ask: {{{1|}}} | |
| {{#if: {{{caption|}}} | ?{{{caption}}} }} | | {{#if: {{{caption|}}} | ?{{{caption}}} }} | ||
| format=gallery | | format=gallery | ||
| Line 14: | Line 20: | ||
| limit={{#if: {{{limit|}}} | {{{limit}}} | 40 }} | | limit={{#if: {{{limit|}}} | {{{limit}}} | 40 }} | ||
| searchlabel=More | | searchlabel=More | ||
| − | + | }}}}</includeonly> | |
Revision as of 08:19, 1 July 2015
Generate a section containing a grid of files based on a query. If nothing matches, the result is empty.
- First parameter: SMW query to execute
- title: title for the section header; default is "Related Files"
- caption: property to use as a caption; default is none
- sort: property or property list for sorting; default is "File Year"
- limit: max size; default is 40