Template:ImageButton: Difference between revisions

From Echopedia
m 6 revisions imported: Imported from echopedia.gg (dump 2026-05-25)
No edit summary
Line 1: Line 1:
{{#tag:html|
<div class="image_button" style="display:inline-block; width:160px; margin:6px; border:1px solid #aaa; border-radius:6px; text-align:center; vertical-align:top; overflow:hidden; background-color:#f9f9f9;">
[[{{{page}}}|{{#if:{{{image|}}}|[[File:{{{image}}}|160x100px|frameless]]<br>}}'''{{{text}}}''']]
<div class="image_button">
</div><noinclude>
<a href="/wiki/{{{page}}}">
 
<div style="background-image: url('{{{image}}}');">
{{{text}}}
</div>
</a>
</div>
}}
<noinclude>
<templatedata>
<templatedata>
{
{
"params": {
"params": {
"text": {
"text": {
"description": "Content of the button",
"description": "Content of the button",
"type": "string",
"type": "string",
"required": true
"required": true
},
},
"image": {
"image": {
"description": "Filename of an uploaded wiki image (not a URL). Omit for a text-only button.",
"description": "full image url",
"type": "string",
"type": "url",
"suggested": true
"suggested": true
},
},
"page": {
"page": {
"description": "Name of the page to link to",
"description": "Name of the page to link to",
"type": "wiki-page-name",
"type": "wiki-page-name",
"required": true
"required": true
}
}
},
"description": "A large link button with an image background",
"maps": {
"text": {}
},
},
"description": "A card-style link button, optionally with an image",
"format": "block",
"format": "block",
"paramOrder": [
"paramOrder": [
"text",
"text",
"page",
"page",
"image"
"image"
]
]
}
}
</templatedata>
</templatedata>
</noinclude>
</noinclude>

Revision as of 20:29, 11 July 2026

[[{{{page}}}|{{{text}}}]]

<templatedata> { "params": { "text": { "description": "Content of the button", "type": "string", "required": true }, "image": { "description": "Filename of an uploaded wiki image (not a URL). Omit for a text-only button.", "type": "string", "suggested": true }, "page": { "description": "Name of the page to link to", "type": "wiki-page-name", "required": true } }, "description": "A card-style link button, optionally with an image", "format": "block", "paramOrder": [ "text", "page", "image" ] } </templatedata>