Jump to content

Template:ProjectGallery: Difference between revisions

From Squirrel's Lair
Ttenbergen (talk | contribs)
mNo edit summary
Ttenbergen (talk | contribs)
mNo edit summary
Line 11: Line 11:
----
----
</noinclude><includeonly>{{#cargo_compound_query:
</noinclude><includeonly>{{#cargo_compound_query:
tables=Project;fields=Project.mainImage,_pageName,shortDescription;|where=Project.projectType HOLDS "Featured Project" and {{{1|true}}}
tables=Project;fields=Project.mainImage,_pageName,shortDescription;where=Project.projectType HOLDS "Featured Project" and {{{1|true}}}
|tables=Project;fields=Project.mainImage,_pageName,shortDescription;where=NOT(Project.projectType HOLDS "Featured Project") and {{{1|true}}}
|tables=Project;fields=Project.mainImage,_pageName,shortDescription;where=NOT(Project.projectType HOLDS "Featured Project") and {{{1|true}}}
|format=gallery
|format=gallery

Revision as of 20:27, 2021 December 3

This template implements a Mediawiki Extension Cargo query against the Project table in the gallery format (ie pictures with the shortDescription as caption). It takes an optional 1 parameter that it uses as the where clause.

to pass this query a parameter that contains an equal sign, see example in North Forge Fabrication Lab and https://stackoverflow.com/questions/20897400/passing-an-equal-sign-to-a-parameter-in-a-mediawiki-template