Template:ProjectGallery: Difference between revisions
Appearance
Ttenbergen (talk | contribs) No edit summary Tag: Reverted |
Ttenbergen (talk | contribs) mNo edit summary |
||
(7 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
This template implements a [[Mediawiki Extension Cargo]] query against the [[Special:CargoTables/Project|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. | This template implements a [[Mediawiki Extension Cargo]] query against the [[Special:CargoTables/Project|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 | |||
[[Category:Project Wiki Infrastructure]] | [[Category:Project Wiki Infrastructure]] | ||
Line 8: | Line 10: | ||
---- | ---- | ||
</noinclude><includeonly> | </noinclude><includeonly>__NOCACHE__{{#cargo_compound_query: | ||
tables=Project;fields=Project.mainImage,_pageName,shortDescription; | |||
{{ | where=Project.projectType HOLDS "Featured Project" and NOT(Project.projectType HOLDS "Personal Project") and {{{1|true}}} | ||
tables=Project | |tables=Project;fields=Project.mainImage,_pageName,shortDescription; | ||
|fields=Project.mainImage,_pageName,shortDescription | where=Project.projectType HOLDS "Featured Project" and Project.projectType HOLDS "Personal Project" and {{{1|true}}} | ||
|tables=Project;fields=Project.mainImage,_pageName,shortDescription;where=NOT(Project.projectType HOLDS "Featured Project") and NOT(Project.projectType HOLDS "Personal Project") and {{{1|true}}} | |||
|tables=Project;fields=Project.mainImage,_pageName,shortDescription;where=NOT(Project.projectType HOLDS "Featured Project") and project.projectType HOLDS "Personal Project" and {{{1|true}}} | |||
|format=gallery | |format=gallery | ||
|mode=traditional | |mode=traditional | ||
Line 24: | Line 27: | ||
|show dimensions=0 | |show dimensions=0 | ||
|default= | |default= | ||
}}<includeonly> | }} | ||
<includeonly> |
Latest revision as of 22:26, 2024 March 31
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