Template:Infobox: Difference between revisions

From <3 wiki
No edit summary
Tag: 2017 source edit
add escaped line breaks for better
Tag: 2017 source edit
Line 1: Line 1:
<includeonly><templatestyles src="Infobox/styles.css" /><div class="infobox">
<includeonly><templatestyles src="Infobox/styles.css" /><!--\n
<div class="infobox-title">{{{title|{{PAGENAME}}}}}</div>{{#if: {{{subtitle|}}}|
--><div class="infobox">
<!--then --><center>{{{subtitle}}}</center>}}{{#if:{{{image|}}}|
<div class="infobox-title">{{{title|{{PAGENAME}}}}}</div>{{#if: {{{subtitle|}}}
|<center>{{{subtitle}}}</center>}}{{#if:{{{image|}}}|
<div class="infobox-image">
<div class="infobox-image">
{{#ifeq:{{{add_preview|true}}}|true|
{{#ifeq:{{{add_preview|true}}}|true|
<!--then -->[[File:{{#setmainimage:{{{image}}}}}|{{{infobox_image_size|300px}}}]]
<!--then -->[[File:{{#setmainimage:{{{image}}}}}|{{{infobox_image_size|300px}}}]]
|<!--else -->[[File:{{{image}}}|{{{infobox_image_size|300px}}}]]}}</div>}}
|<!--else -->[[File:{{{image}}}|{{{infobox_image_size|300px}}}]]}}</div>}}
<table class="infobox-table">{{{infobox_items}}}</table>
<table class="infobox-table">
</div>{{#ifeq: {{{add_category|true}}}|true|[[Category:{{{category_name}}}]]}}</includeonly><noinclude>
{{{infobox_items}}}
</table>
</div><!--\n
-->{{#ifeq: {{{add_category|true}}}|true|[[Category:{{{category_name}}}]]}}</includeonly><noinclude>
‎<templatedata>{
‎<templatedata>{
"description": "Infobox for telegram channel",
"description": "Generic meta-template for defining infobox templates",
"format": "block",
"format": "block",
"params": {
"params": {

Revision as of 23:13, 22 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
add_categoryadd_category

Whether to add category tag with this template

Default
true
Booleanoptional
category_namecategory_name

Name of the category to put the page into. Provide if your infobox allows specifying category.

Page namesuggested