Template:Infobox: Difference between revisions

From <3 wiki
reorder items in templatedata
Tag: 2017 source edit
No edit summary
Tag: 2017 source edit
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><templatestyles src="Infobox/styles.css" />
<includeonly><templatestyles src="Infobox/styles.css" /><!--\n
<div class="infobox">
--><div class="infobox">
<div class="infobox-title">{{{title|{{PAGENAME}}}}}</div>
<div class="infobox-title">{{#if: {{{title|}}} | {{{title}}} | {{PAGENAME}} }}</div>{{#if: {{{subtitle|}}}
{{#if: {{{subtitle|}}}|<!--then --><center>Telegram channel</center>}}
|<center>{{{subtitle}}}</center>}}{{#if:{{{image|}}}|
{{#if:{{{image|}}}|
<div class="infobox-image">
<div class="infobox-image">
{{#ifeq:{{{add_preview|true}}}|true|
{{#ifeq:{{{add_preview|true}}}|true|
Line 11: Line 10:
{{{infobox_items}}}
{{{infobox_items}}}
</table>
</table>
</div>{{#ifeq: {{{add_category|true}}}|true|[[Category:{{{category_name}}}]]}}</includeonly>
</div></includeonly><noinclude>
<noinclude>
‎<templatedata>{
‎<templatedata>{
"description": "Infobox for telegram channel",
"description": "Generic meta-template for defining infobox templates",
"format": "block",
"format": "block",
"params": {
"params": {
Line 32: Line 30:
"suggested": true,
"suggested": true,
"description": "Image to be used in infobox. Will also be used in page preview."
"description": "Image to be used in infobox. Will also be used in page preview."
},
"add_category": {
"description": "Whether to add category tag with this template",
"type": "boolean",
"default": "true"
},
},
"add_preview": {
"add_preview": {
Line 46: Line 39:
"description": "Size of image in infobox",
"description": "Size of image in infobox",
"default": "300px"
"default": "300px"
},
"category_name": {
"description": "Name of the category to put the page into. Provide if your infobox allows specifying category.",
"type": "wiki-page-name",
"suggested": true
},
},
"infobox_items": {
"infobox_items": {
Line 63: Line 51:
"infobox_image_size",
"infobox_image_size",
"add_preview",
"add_preview",
"infobox_items",
"infobox_items"
"add_category",
"category_name"
]
]
}
}
</templatedata>
</templatedata>
</noinclude>
</noinclude>

Latest revision as of 00:49, 23 December 2024

Generic meta-template for defining infobox templates

Template parameters[Edit template data]

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Titletitle

Title shown at the top of the template. Defaults to page title

Lineoptional
subtitlesubtitle

Text shown below title and above image

Unknownoptional
Imageimage

Image to be used in infobox. Will also be used in page preview.

Filesuggested
infobox_image_sizeinfobox_image_size

Size of image in infobox

Default
300px
Unknownoptional
add_previewadd_preview

Whether to set infobox image as OpenGraph preview

Default
true
Booleanoptional
infobox_itemsinfobox_items

Content shown inside infobox. Each entry should be enclosed in <tr>

Stringoptional