Difference between revisions of "Template:Media gallery filter"
Jump to navigation
Jump to search
Line 25: | Line 25: | ||
}} | }} | ||
</includeonly> | </includeonly> | ||
+ | <noinclude> | ||
+ | <templatedata> | ||
+ | { | ||
+ | "params": { | ||
+ | "1": { | ||
+ | "label": "Property name", | ||
+ | "type": "string" | ||
+ | }, | ||
+ | "2": { | ||
+ | "label": "Property value", | ||
+ | "type": "string" | ||
+ | }, | ||
+ | "3": { | ||
+ | "label": "Media type", | ||
+ | "type": "string", | ||
+ | "default": "+" | ||
+ | }, | ||
+ | "class": { | ||
+ | "label": "Class", | ||
+ | "example": "fixed", | ||
+ | "type": "string" | ||
+ | } | ||
+ | }, | ||
+ | "description": "Selects media, optionally of the given type, filtered by the given property value. ", | ||
+ | "paramOrder": [ | ||
+ | "1", | ||
+ | "2", | ||
+ | "3", | ||
+ | "class" | ||
+ | ] | ||
+ | } | ||
+ | </templatedata> | ||
+ | ;Usage | ||
+ | <pre> | ||
+ | {{Media gallery filter | ||
+ | |Year # Property name to be searched | ||
+ | |1918 # Property value to be filtered by | ||
+ | |Newspaper ad # Media type [ Newspaper ad | Newspaper clipping | Newspaper article | Photo | Letterhead | Map | Logo | Newspaper PDF | Non-newspaper ad ] | ||
+ | }} | ||
+ | </pre> | ||
+ | ;Result | ||
+ | {{Media gallery filter | ||
+ | |Year | ||
+ | |1918 | ||
+ | |Newspaper ad | ||
+ | }} | ||
+ | ;The same with the "fixed" tiles | ||
+ | <pre> | ||
+ | {{Media gallery filter | ||
+ | |Year | ||
+ | |1918 | ||
+ | |Newspaper ad | ||
+ | |class=fixed | ||
+ | }} | ||
+ | </pre> | ||
+ | ;Result | ||
+ | {{Media gallery filter | ||
+ | |Year | ||
+ | |1918 | ||
+ | |Newspaper ad | ||
+ | |class=fixed | ||
+ | }} | ||
+ | </noinclude> |
Revision as of 19:20, 16 August 2022
Selects media, optionally of the given type, filtered by the given property value.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Property name | 1 | no description | String | optional |
Property value | 2 | no description | String | optional |
Media type | 3 | no description
| String | optional |
Class | class | no description
| String | optional |
- Usage
{{Media gallery filter |Year # Property name to be searched |1918 # Property value to be filtered by |Newspaper ad # Media type [ Newspaper ad | Newspaper clipping | Newspaper article | Photo | Letterhead | Map | Logo | Newspaper PDF | Non-newspaper ad ] }}
- Result
- The same with the "fixed" tiles
{{Media gallery filter |Year |1918 |Newspaper ad |class=fixed }}
- Result