Template:Portal card
| This template uses TemplateStyles: |
Renders a Tier 2 structured card (.portal-card) with an optional header bar, icon or image, right-aligned header actions, single-column or 2-column split body, and aligned footer using Template:Portal styles. Intended for use inside <div class="portal-grid portal-grid--2">, portal-grid--3, portal-grid--feature, or standalone.
Always use the named body= parameter when the card body contains an equals sign (such as URL query strings, OSM tags, or HTML attributes). If the card body contains a raw wikitable, escape table pipes with {{!}}; if a <syntaxhighlight> block contains pipe characters (|), use {{#tag:syntaxhighlight|...|lang=bash}} with {{!}} or raw <div class="portal-card"> markup.
Usage
<div class="portal-grid portal-grid--2">
{{Portal card
| id = websites
| icon = browser
| title = Add a map to a website
| body =
* '''[[Leaflet]]''': {{Portal muted|lightweight raster map library}}
* '''[[MapLibre]]''': {{Portal muted|vector tiles and 3D rendering}}
| footer = '''See also''': [[Deploying your own Slippy Map]]
}}
{{Portal card
| tone = neutral
| icon = newspaper
| level = 2
| title = News
| actions = [{{fullurl:Template:News|action=edit}} edit] · [[News Archive|archive]]
| actions_plain = yes
| body =
{{News|bare=yes}}
}}
</div>
Two-column split body inside a single card:
{{Portal card
| id = editors
| icon = edit
| level = 2
| title = Editors & tagging
| body =
<div class="portal-subhead">Editors</div>
* '''[[ID|iD]]''': {{Portal muted|default browser editor}}
| body2 =
<div class="portal-subhead">Tagging references</div>
* '''[[Map features]]''': {{Portal muted|common keys and values}}
}}
TemplateData
Renders a structured portal card with optional header, icon, actions, split body, and footer using Template:Portal styles.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Header title | title | Card heading text displayed in the header bar. Leave empty to omit the header bar. | Content | optional |
| Card body | body 1 | Main card content (or left column when body2 is set). Always use named body= when content contains an equals sign. | Content | required |
| Second column body | body2 | Optional right-column content inside .portal-split alongside body. | Content | optional |
| Header icon | icon | Icon name passed to Template:Codex icon (or Template:OOjs icon when icon_set=oojs), for example browser, edit, or calendar. | String | optional |
| Icon set | icon_set | Icon template to use: leave empty or codex for Template:Codex icon, or oojs for Template:OOjs icon.
| String | optional |
| Icon size | icon_size | Icon width passed to the icon template. Defaults to 15px when tone=neutral, or 16px otherwise. | String | optional |
| Header image filename | image | Optional wiki image filename without the File: prefix (for example Flag of Finland.svg) displayed inline on the left of the header bar instead of an icon. | File | optional |
| Header image size | image_size | Width of the header image, for example 20px or 22px.
| String | optional |
| Header image border | image_border | Whether to add MediaWiki's 1px image border (default yes). Set to no for transparent logos.
| String | optional |
| Header image link | image_link | Optional link target for the header image. Leave empty for a decorative image. | String | optional |
| Header image alt text | image_alt | Accessible alternative text for the header image. Leave empty for a decorative image. | String | optional |
| Tone | tone | Visual style: leave empty for default OSM green, featured for 2px green emphasis border, or neutral for subtle grey dashboard cards.
| String | optional |
| Anchor ID | id | Optional HTML id attribute placed on the card container for direct section links. | String | optional |
| ARIA heading level | level | Heading level assigned to the card header.
| Number | optional |
| Header actions | actions | Optional short right-aligned links in the header bar, such as edit or archive links. | Content | optional |
| Plain external links in actions | actions_plain | Set to yes to add the plainlinks class to the header actions span. | String | optional |
| Unbulleted list body | plain | Set to yes to apply .portal-card__body--plain for unbulleted link lists. | String | optional |
| Footer | footer | Optional bottom footer strip aligned across cards in the same grid row. | Content | optional |