Template:Box: Difference between revisions

From AYSO Wiki
Content deleted Content added
No edit summary
No edit summary
Line 1: Line 1:
<includeonly>
<includeonly>
<div class="card with-{{#ifeq:{{{header|}}}|bottom|footer|header}} border border-primary"
<div class="card with-{{#ifeq:{{{header|}}}|bottom|footer|header}} border border-primary"
style="width:100% !important; max-width:100% !important; min-width:0 !important; float:none !important; box-sizing:border-box; height:340px; position:relative; overflow:hidden; background-position:center; background-repeat:no-repeat; background-size:cover;"
style="height:340px; position:relative; overflow:hidden; background-position:center; background-repeat:no-repeat; background-size:cover;"
{{#if:{{{image|}}}|data-background="{{#ifeq:{{{image|}}}|default|/w/extensions/MyWikisLocalConfig/Ayso-logo.png|{{filepath:{{PAGENAME:{{{image|}}}}}}}}}"}}><!--
{{#if:{{{image|}}}|data-background="{{#ifeq:{{{image|}}}|default|/w/extensions/MyWikisLocalConfig/Ayso-logo.png|{{filepath:{{PAGENAME:{{{image|}}}}}}}}}"}}><!--


Line 33: Line 33:
|title=
|title=
|target=
|target=
|header=bottom
|header=
|image=
|image=
|content=
|content=
}}
}}
</pre>
</pre>

;Example
;Example
(Wrapped into [[Template:Boxes]])
(Wrapped into [[Template:Boxes]])
Line 61: Line 60:
}}
}}
}}
}}
<templatedata>
</noinclude>
{
"params": {
"header": {
"label": "Box header position",
"description": "Set to \"bottom\" to move header down. Otherwise it will show up at the top.",
"type": "string"
},
"image": {
"label": "Image",
"description": "Name of the uploaded image to be shown as the box background.",
"type": "wiki-file-name"
},
"target": {
"label": "Link target",
"description": "Name of the page to link the box to.",
"type": "wiki-page-name"
},
"title": {
"label": "Box title",
"description": "If not set, falls back to `target`.",
"type": "string"
},
"content": {
"label": "Box content",
"description": "Arbitrary wikitext adapted for use inside templates.",
"type": "content"
}
},
"description": "Creates a box.",
"paramOrder": [
"title",
"header",
"target",
"image",
"content"
]
}
</templatedata></noinclude>

Revision as of 10:10, 12 February 2026


Usage
{{Box
|title=
|target=
|header=
|image=
|content=
}}
Example

(Wrapped into Template:Boxes)

Creates a box.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Box titletitle

If not set, falls back to `target`.

Stringoptional
Box header positionheader

Set to "bottom" to move header down. Otherwise it will show up at the top.

Stringoptional
Link targettarget

Name of the page to link the box to.

Page nameoptional
Imageimage

Name of the uploaded image to be shown as the box background.

Fileoptional
Box contentcontent

Arbitrary wikitext adapted for use inside templates.

Contentoptional