Template:ProjectCard
More actions
Page Template:ProjectBadges/styles.css has no content.
ProjectCard
Displays a visual project card used on hub pages. Shows a cover image, project name, status/license badges, creator, optional custom fields, tags, and a hover description overlay. Contributor count and last-edited date are populated by MediaWiki:Gadget-projects.js.
Styles are loaded from Template:ProjectCard/styles.css.
⚠️ This template is called automatically by Cargo via #cargo_query on hub pages. You should not need to call it manually. See Template:ProjectInfobox for how projects are submitted to the database.
Called by Cargo — example query
{{#cargo_query:
tables = Projects
| fields = _pageName=pagename, name, categories, status, license, creator,
description, image, tags, field1label, field1value,
field2label, field2value, field3label, field3value, field4label, field4value
| where = categories HOLDS 'Audio'
| order by = Projects._pageName
| limit = 500
| format = template
| template = ProjectCard
| named args = yes
| no results text = <div class="project-hub-empty">No projects yet.</div>
}}
Parameters (passed by Cargo via named args=yes)
pagename- Full page name (aliased from
_pageName). Used for the card title link and gadget API calls. name- Project display name.
status- Project status. Values:
Active,Hiatus,Completed,Abandoned. license- License name shown as a badge (e.g.
CC-BY-SA 4.0). creator- Creator or team name.
description- Short description shown in the hover overlay.
image- Cover image filename (e.g.
MyProject.png). tags- Space-separated tag string.
field1label–field4label- Optional custom field labels.
field1value–field4value- Optional custom field values.
Displays a visual project card. Normally called automatically by Cargo on hub pages — see Template:ProjectInfobox for submitting projects.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Page name | pagename | Full wiki page name of the project. Used for the card title link. | Page name | required |
| Project name | name | Display name shown on the card. | String | optional |
| Status | status | Current project status. Affects badge colour.
| String | optional |
| License | license | License name shown as a badge (e.g. CC-BY-SA 4.0). | String | optional |
| Creator | creator | Creator or team name. | String | optional |
| Description | description | Short description shown in the hover overlay. Keep to 1-2 sentences. | Content | optional |
| Cover image | image | Cover image filename without File: prefix (e.g. MyProject.png). | File | optional |
| Tags | tags | Space-separated keywords used for hub filtering. | String | optional |
| Custom field 1 label | field1label | no description | String | optional |
| Custom field 1 value | field1value | no description | String | optional |
| Custom field 2 label | field2label | no description | String | optional |
| Custom field 2 value | field2value | no description | String | optional |
| Custom field 3 label | field3label | no description | String | optional |
| Custom field 3 value | field3value | no description | String | optional |
| Custom field 4 label | field4label | no description | String | optional |
| Custom field 4 value | field4value | no description | String | optional |