Template:Collection: Difference between revisions

From Charleswood Historical Society
Jump to navigation Jump to search
No edit summary
No edit summary
 
(33 intermediate revisions by 2 users not shown)
Line 15: Line 15:
}
}
</templatedata>
</templatedata>
{{#cargo_declare:
_table = Collection
|Description = string
}}


[[Category:Kiosk wiki infrastructure]]
[[Category:Kiosk wiki infrastructure]]
----
----


</noinclude>{{{Description}}}<div style="display: none;">
</noinclude>__NOEDITSECTION__{{{description| }}}
<includeonly>
<!--q pages -->{{#cargo_query:
 
|tables=CollectedIn, Collection
{{#cargo_query:
|join on=CollectedIn._pageName=Collection._pageName <!-- yes _pN on _pN since we are checking that the pages found are not sub-collections -->
tables=Collection_assignment
|fields=CollectedIn._pageName=collected pages
|fields=_pageName
|where=Collection._pageName is null
|where=Collection={{PAGENAME}}
      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
|limit=1000
|default={{PAGENAME}} collection has no contents
|default={{PAGENAME}} collection has no pages
|intro===Items in {{PAGENAME}} collection==
|intro===Items in {{PAGENAME}} collection==
|format=ul
|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:
{{#cargo_query:
intro==={{PAGENAME}} gallery==
tables=Collection_assignment, Image_description
|tables=CollectedIn, Image_description
|join on=Collection_assignment._pageName=Image_description._pageName
|join on=CollectedIn._pageName=Image_description._pageName
|fields=Collection_assignment._pageName, Description
|fields=CONCAT("[[",Image_description._pageName,"|200px]]")=Image, Description,
|where=Collection={{PAGENAME}}
|where=(Collection = "{{PAGENAME}}" or Collection WITHIN "{{PAGENAME}}") and (CollectedIn._pageName like "%.jpg" or CollectedIn._pageName like "%.png")
|group by=CollectedIn._pageName, Description
|limit=1000
|limit=1000
|default=There are no pictures in the {{PAGENAME}} collection
|default=<!-- if no images show nothing -->
|intro==={{PAGENAME}} gallery==
|format=table
|format=gallery
|caption field=Description
|show bytes=0
|show dimensions=0
|show filename=0
}}
}}
<div style="display: none;"><includeonly>
{{#default_form:Collection}}
{{#default_form:Collection}}
 
{{#cargo_store:_table=Collection}}
[[Category:Collection]]
[[Category:Collection]]
</includeonly>
</includeonly>
</div>
</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.

[Edit template data]

Template parameters

ParameterDescriptionTypeStatus
descriptiondescription

What defines this collection.

Example
This is a collection of information and images about families who live or have lived in Charleswood.
Stringrequired

This template defines the table "Collection". View table.



Collection collection has no pages