From Brotato Wiki
No edit summary |
No edit summary |
||
| Line 4: | Line 4: | ||
-->{{#if: {{{2|}}} | {{MODBadge|{{{2|}}}}} | {{MODBadge}} }}<!-- | -->{{#if: {{{2|}}} | {{MODBadge|{{{2|}}}}} | {{MODBadge}} }}<!-- | ||
--></span><!-- | --></span><!-- | ||
--></includeonly></onlyinclude> | --></includeonly></onlyinclude><noinclude> | ||
Add a "Mod Name" text badge to a link. Accepts a link as the first parameter, and optional text. If no text is specified, the link will be used as the text. | Add a "Mod Name" text badge to a link. Accepts a link as the first parameter, and optional badge text as the second parameter. If no text override is specified, the link will be used as the display text. | ||
{| class="wikitable" | {| class="wikitable" | ||
| Line 17: | Line 17: | ||
|<code><nowiki>{{MODLink|Holy|Fantasy}}</nowiki></code> | |<code><nowiki>{{MODLink|Holy|Fantasy}}</nowiki></code> | ||
|{{MODLink|Holy|Fantasy}} | |{{MODLink|Holy|Fantasy}} | ||
|- | |||
|<code><nowiki>{{MODLink|Holy|Fantasy|text=Custom Text}}</nowiki></code> | |||
|{{MODLink|Holy|Fantasy|text=Custom Text}} | |||
|} | |} | ||
| Line 28: | Line 31: | ||
], | ], | ||
"label": "Link (Page Name)", | "label": "Link (Page Name)", | ||
"description": "The target page to link to", | |||
"type": "string", | "type": "string", | ||
"required": true | "required": true | ||
}, | }, | ||
"text": { | "text": { | ||
"label": "Text Override", | |||
"description": "Override the display text of the link. If not provided, uses the link name.", | |||
"type": "string", | |||
"suggested": true | |||
}, | |||
"badge": { | |||
"aliases": [ | "aliases": [ | ||
"2" | "2" | ||
], | ], | ||
"label": "Text | "label": "Badge Text", | ||
"description": " | "description": "Text displayed in the badge (e.g., 'Fantasy'). If not provided, defaults to 'MOD'.", | ||
"type": "string", | "type": "string", | ||
"suggested": true | "suggested": true | ||
Latest revision as of 13:11, 14 May 2026
Add a "Mod Name" text badge to a link. Accepts a link as the first parameter, and optional badge text as the second parameter. If no text override is specified, the link will be used as the display text.
| Code | Result |
|---|---|
{{MODLink|Holy}}
|
Holy(MOD) |
{{MODLink|Holy|Fantasy}}
|
Holy(Fantasy) |
{{MODLink|Holy|Fantasy|text=Custom Text}}
|
Custom Text(Fantasy) |
No description.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Link (Page Name) | link 1 | The target page to link to | String | required |
| Text Override | text | Override the display text of the link. If not provided, uses the link name. | String | suggested |
| Badge Text | badge 2 | Text displayed in the badge (e.g., 'Fantasy'). If not provided, defaults to 'MOD'. | String | suggested |