Sablon:Entity/Related/doc
More actions
Renders an entity's set components and cosmetic variants as a grid of image cards. Designed to sit further down an entity page as body content, separate from the Template:Entity infobox at the top. Reads the same upstream API data via Module:Entity/Data, so the cache is shared with any other Entity-family template on the page.
Items only today — the related-items data comes from the items endpoint, so non-item entities render nothing.
Usage
Explicit UUID:
{{Entity/Related|uuid=80ee3b95-5665-4548-9e2d-d2067895c0ac}}
When Template:Entity has been invoked earlier on the page, the UUID can be omitted — it falls back to the value stored in SMW on the current page:
{{Entity}}
== Related ==
{{Entity/Related}}
Parameters
Renders an entity's set components and cosmetic variants as a grid of image cards. Designed to sit further down an entity page as body content, separate from the Template:Entity infobox at the top. Reads the same upstream API data via Module:Entity/Data, so the cache is shared with any other Entity-family template on the page.
| Paraméter | Leírás | Típus | Állapot | |
|---|---|---|---|---|
| UUID | uuid | UUID of the entity to render. If omitted, defaults to the UUID stored in SMW (set by Template:Entity on a prior parse). Required if Template:Entity hasn't been invoked.
| Karakterlánc | nem kötelező |
Behavior
- Renders up to two card grids in this order: Set pieces (other items that make up a wearable set, e.g. helmet/torso/legs) and Variants (cosmetic variants of the same base item, e.g. different colorways).
- Each card shows the item's page image (resolved via the SMW
Page Imageproperty in a single batched query) with the item name overlaid at the bottom. Variant cards add the variant differentiator (e.g.Black, or(base)when the base item has no variant name) as the primary label; set cards add the resolved type (e.g.Helmet) as a small kicker above the name. - The whole card is clickable. MediaWiki's sanitizer strips raw
<a>tags, so the card uses a "fakelink": a transparent absolutely-positioned[[Page|Page]]wikilink wrapper that stretches to fill the card. - The current page is filtered out of the variants list so the entity never links to itself. Set components are always distinct items, so no self-reference check is needed there.
- Items without a
Page ImageSMW value fall back toPlaceholderv2.pngso the grid layout stays stable. - Renders nothing (empty string) when the upstream fetch fails, the entity has no
related_items, or both buckets are empty.
See also
- Template:Entity — the main entity infobox; sets the SMW UUID this template falls back to.
- Template:Entity/Availability — sibling renderer for shop/loot/pledge availability.
- Template:Entity/Description — sibling renderer for the in-game description.
- Module:Entity/Related — implementation.