Template:Background: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
m (Updated documentation with Template demo)
(Removed alias parameter and replace with standard alias syntaxing and updated documentation)
Line 24: Line 24:
| Legend of Baldur's Gate
| Legend of Baldur's Gate
| Hermit
| Hermit
| Sailor = {{IconLink|Background {{{1}}} Icon.png|{{{1}}}|{{{alias|{{{1}}}}}}|size={{{2|25}}}|nowrap=y}}
| Sailor = {{IconLink|Background {{{1}}} Icon.png|{{{1}}}|{{{2|{{{1}}}}}}|size={{{w|25}}}|nowrap=y}}
| #default = [[{{{1}}}|{{{alias|{{{1}}}}}}]]
| #default = [[{{{1}}}|{{{2|{{{1}}}}}}]]
}}</includeonly><noinclude>
}}</includeonly><noinclude>
{{documentation|content=
{{documentation|content=
Line 36: Line 36:
| <nowiki>{{Background|Urchin}}</nowiki>
| <nowiki>{{Background|Urchin}}</nowiki>
| caption 2 = Adjusted icon size
| caption 2 = Adjusted icon size
| <nowiki>{{Background|Acolyte|40}}</nowiki>
| <nowiki>{{Background|Acolyte|w=40}}</nowiki>
| caption 3 = Link alias
| caption 3 = Link alias
| <nowiki>{{Background|Charlatan|alias=Trickster}}</nowiki>
| <nowiki>{{Background|Charlatan|Trickster}}</nowiki>
| caption 4 = Alias and adjusted size
| caption 4 = Alias and adjusted size
| <nowiki>{{Background|Entertainer|20|alias=Musician}}</nowiki>
| <nowiki>{{Background|Entertainer|Musician|w=20}}</nowiki>
}}
}}


Line 81: Line 81:
"required": true
"required": true
},
},
"2": {
        "2": {
"label": "Alias",
"description": "A user-defined alias to be shown instead of the background name.",
"type": "string"
},
"w": {
"label": "Icon size",
"label": "Icon size",
"description": "The pixel size of the accompanying icon.",
"description": "The pixel size of the accompanying icon.",
"type": "number"
"type": "number"
},
        "alias": {
"label": "Alias",
"description": "A user-defined alias to be shown instead of the background name.",
"type": "string"
}
}
}
}

Revision as of 05:32, 29 July 2024

Template documentation

This template is used to visually represent backgrounds.

Examples

Example Markup Renders as
Basic usage
{{Background|Urchin}}
Urchin Urchin
Adjusted icon size
{{Background|Acolyte|w=40}}
Acolyte Acolyte
Link alias
{{Background|Charlatan|Trickster}}
Trickster Trickster
Alias and adjusted size
{{Background|Entertainer|Musician|w=20}}
Musician Musician

Template data

Insert a link to a background accompanied by the associated icon.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Background name1

The name of the background.

Suggested values
Acolyte Charlatan Criminal Entertainer Folk Hero Guild Artisan Noble Outlander Sage Soldier Urchin Haunted One Hermit Sailor Trickster Hedonist Astral Zealot Wizard of Waterdeep Cloistered Stray Blade of Frontiers Blood War Veteran Underdark Exile Grove Tender World-Wise Heroine Legend of Baldur's Gate
Stringrequired
Alias2

A user-defined alias to be shown instead of the background name.

Stringoptional
Icon sizew

The pixel size of the accompanying icon.

Numberoptional