Template:File Gallery: Difference between revisions

From Smith Family Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
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>{{Wrap|{{H2|{{#if: {{{title|}}} | {{{title}}} | Related Files }}}}
</noinclude><includeonly>{{#if:
{{#ask: {{{1|}}}
| {{#if: {{{caption|}}} | ?{{{caption}}} }}
| sort={{#if: {{{sort|}}} | {{{sort}}} | File Year }}
| limit=1
}}
| {{H2|{{#if: {{{title|}}} | {{{title}}} | Related Files}}}}


|{{Clean SMW|{{#ask: {{{1|}}}
{{#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>
}}}}</includeonly>

Revision as of 09: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