Template:NavCard: Difference between revisions
Template page
More actions
No edit summary  |
Add <templatedata> for Visual Editor Usage. Â |
||
| Line 13: | Line 13: | ||
</pre> | </pre> | ||
Wrap multiple NavCards in <code>{{[[Template:CardGrid|CardGrid]]}}</code> | Wrap multiple NavCards in <code>{{[[Template:CardGrid|CardGrid]]}}</code>. | ||
=== Parameters === | === Parameters === | ||
; <code>icon</code> : Icon filename without <code>.png</code> extension (e.g. <code>apps-help-browser</code>). Defaults to <code>places-folder</code> | ; <code>icon</code> : Icon filename without <code>.png</code> extension (e.g. <code>apps-help-browser</code>). Defaults to <code>places-folder</code>. | ||
; <code>name</code> : Card title | ; <code>name</code> : Card title and link display text. Defaults to "Page". | ||
; <code>link</code> : Wiki page to link to. Required for the card to be clickable. | ; <code>link</code> : Wiki page to link to. Required for the card to be clickable. | ||
; <code>description</code> : Optional | ; <code>description</code> : Optional short text below the title. | ||
 | |||
<templatedata> | |||
{ | |||
  "description": "Displays a styled icon navigation card with a title link and optional description. Wrap multiple cards in {{CardGrid}}.", | |||
  "params": { | |||
    "icon": { | |||
      "label": "Icon", | |||
      "description": "Icon filename without the .png extension (e.g. apps-help-browser). Browse icons at Special:ListFiles.", | |||
      "type": "string", | |||
      "default": "places-folder", | |||
      "required": false | |||
    }, | |||
    "name": { | |||
      "label": "Name", | |||
      "description": "Card title, also used as the link display text.", | |||
      "type": "string", | |||
      "default": "Page", | |||
      "required": false | |||
    }, | |||
    "link": { | |||
      "label": "Link", | |||
      "description": "Wiki page this card links to.", | |||
      "type": "wiki-page-name", | |||
      "required": true | |||
    }, | |||
    "description": { | |||
      "label": "Description", | |||
      "description": "Optional short text shown below the title. Keep to one sentence.", | |||
      "type": "string", | |||
      "required": false | |||
    } | |||
  }, | |||
  "format": "inline" | |||
} | |||
</templatedata> | |||
[[Category:Layout Templates]] | [[Category:Layout Templates]] | ||
</noinclude> | </noinclude> | ||
Latest revision as of 08:28, 23 March 2026
NavCard
Displays a styled navigation card with an icon, title link, and optional description. Used in card grids on hub pages, the Guidebook, and the Main Page. Styles are loaded from Template:NavCard/styles.css.
Usage
{{NavCard
| icon = apps-help-browser
| name = FAQ
| link = FAQ
| description = Frequently asked questions about the wiki and community.
}}
Wrap multiple NavCards in {{CardGrid}}.
Parameters
icon- Icon filename without
.pngextension (e.g.apps-help-browser). Defaults toplaces-folder. name- Card title and link display text. Defaults to "Page".
link- Wiki page to link to. Required for the card to be clickable.
description- Optional short text below the title.
Displays a styled icon navigation card with a title link and optional description. Wrap multiple cards in {{CardGrid}}.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Icon | icon | Icon filename without the .png extension (e.g. apps-help-browser). Browse icons at Special:ListFiles.
| String | optional |
| Name | name | Card title, also used as the link display text.
| String | optional |
| Link | link | Wiki page this card links to. | Page name | required |
| Description | description | Optional short text shown below the title. Keep to one sentence. | String | optional |