Template:Collection: Difference between revisions
Jump to navigation
Jump to search
Ttenbergen (talk | contribs) (Created page with " <noinclude> <templatedata> { "params": { "Collection_group": { "label": "Collection group", "description": "Is this collection part of a set of collections. ", "example": "Family collections", "type": "string", "suggestedvalues": [ ", Pioneers, Businesses, Historical Stories, Events, Sports/Team" ], "required": true, "suggested": true } }, "description": "This template is used on pages about collections to query for everything in the c...") |
Ttenbergen (talk | contribs) No edit summary |
||
(45 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
<templatedata> | <templatedata> | ||
{ | { | ||
"description": "This template is used at the top of all collection pages to provide consistent listing of their contents. ", | |||
"params": { | "params": { | ||
" | "description": { | ||
"label": " | "label": "description", | ||
"description": " | "description": "What defines this collection. ", | ||
"example": " | "example": "This is a collection of information and images about families who live or have lived in Charleswood.", | ||
"type": "string", | "type": "string", | ||
"required": true, | "required": true, | ||
"suggested": true | "suggested": true | ||
} | } | ||
} | } | ||
} | } | ||
</templatedata> | </templatedata> | ||
</noinclude> | {{#cargo_declare: | ||
_table = Collection | |||
|Description = string | |||
}} | |||
[[Category:Kiosk wiki infrastructure]] | |||
---- | |||
</noinclude>__NOEDITSECTION__{{{description| }}} | |||
<!--q pages -->{{#cargo_query: | |||
|tables=CollectedIn, Collection | |||
|join on=CollectedIn._pageName=Collection._pageName <!-- yes _pN on _pN since we are checking that the pages found are not sub-collections --> | |||
|fields=CollectedIn._pageName=collected pages | |||
|where=Collection._pageName is null | |||
and (Collection = "{{PAGENAME}}" or Collection WITHIN "{{PAGENAME}}") | |||
and not CollectedIn._pageName Like "%.jpg" and not CollectedIn._pageName Like "%.png" <!--imgs listed in gallery below--> | |||
|group by=CollectedIn._pageName | |||
|limit=1000 | |||
|default={{PAGENAME}} collection has no pages | |||
|intro===Items in {{PAGENAME}} collection== | |||
|format=ul | |||
}} | |||
<!-- q sub-collections -->{{#cargo_query: | |||
intro=Sub-collections: | |||
|format=ul | |||
|tables=CollectedIn, Collection | |||
|join on=CollectedIn._pageName=Collection._pageName | |||
|fields=Collection._pageName | |||
|where=(Collection = "{{PAGENAME}}" or Collection WITHIN "{{PAGENAME}}") and Collection._pageName>"" | |||
|group by=CollectedIn._pageName | |||
|limit=1000 | |||
|default=<!-- blank - no sub-collections should be the norm --> | |||
|intro===Sub-Collections in {{PAGENAME}} collection== | |||
}} | |||
<!-- q images -->{{#cargo_query: | |||
intro==={{PAGENAME}} gallery== | |||
|tables=CollectedIn, Image_description | |||
|join on=CollectedIn._pageName=Image_description._pageName | |||
|fields=CONCAT("[[",Image_description._pageName,"|200px]]")=Image, Description, | |||
|where=(Collection = "{{PAGENAME}}" or Collection WITHIN "{{PAGENAME}}") and (CollectedIn._pageName like "%.jpg" or CollectedIn._pageName like "%.png") | |||
|group by=CollectedIn._pageName, Description | |||
|limit=1000 | |||
|default=<!-- if no images show nothing --> | |||
|format=table | |||
}} | |||
<div style="display: none;"><includeonly> | |||
{{#default_form:Collection}} | |||
{{#cargo_store:_table=Collection}} | |||
[[Category:Collection]] | |||
</includeonly> | |||
</div> |
Latest revision as of 21:58, 2023 October 6
This template is used at the top of all collection pages to provide consistent listing of their contents.
Parameter | Description | Type | Status | |
---|---|---|---|---|
description | description | What defines this collection.
| String | required |
This template defines the table "Collection". View table.
Collection collection has no pages