Template:Infobox person: Difference between revisions

From WikiAlpha
Person infobox by PHT
 
mNo edit summary
Tag: Reverted
Line 1: Line 1:
__INDEX__
<table class="infobox" style="width:22em; border:1px solid #a2a9b1; border-collapse:collapse; background-color:#f8f9fa;">
<infobox>
<tr>
<title source="name"><default>{{PAGENAME}}</default></title>
<th colspan="2" class="infobox-title" style="text-align:center; font-size:125%; font-weight:bold; color:black; background-color:#eaecf0; padding:0.25em;">{{#if:{{{title|}}}|{{{title}}}|{{PAGENAME}}}}</th>
<image source="image">
</tr>
    <caption source="caption"></caption>
{{#if:{{{above|}}}|
    </image>
<tr>
<data source="gender"><label>Gender</label></data>
<td colspan="2" class="infobox-above" style="text-align:center; font-size:110%; font-weight:bold; padding:0.25em;">{{{above}}}</td>
<data source="age"><label>Age</label></data>
</tr>}}
<data source="birth_name"><label>Born</label></data>
{{#if:{{{image|}}}|
<data source="birth_date"><label>Birth date</label></data>
<tr>
<data source="birth_place"><label>Birth place</label></data>
<td colspan="2" class="infobox-image" style="text-align:center; padding:0.25em;">[[File:{{{image}}}|{{#if:{{{image_size|}}}|{{{image_size}}}|250px}}]]{{#if:{{{caption|}}}|<br /><small>{{{caption}}}</small>}}</td>
<data source="Parents"><label>Parents</label></data>
</tr>}}
<data source="Relatives"><label>Relatives</label></data>
{{#if:{{{header1|}}}|
<data source="nationality"><label>Nationality</label></data>
<tr>
<data source="other_names"><label>Other names</label></data>
<th colspan="2" class="infobox-subheader" style="text-align:center; background-color:#eaecf0; padding:0.25em;">{{{header1}}}</th>
<data source="occupation"><label>Occupation</label></data>
</tr>}}
<data source="years_active"><label>Years active</label></data>
{{{content|}}}
<data source="known_for"><label>Known for</label></data>
{{#if:{{{header2|}}}|
<data source="notable_works"><label>Notable work(s)</label></data>
<tr>
<data source="home_town"><label>Home town</label></data>
<th colspan="2" class="infobox-subheader" style="text-align:center; background-color:#eaecf0; padding:0.25em;">{{{header2}}}</th>
    <data source="website"><label>website</label></data>
</tr>}}
<group>
{{#if:{{{additional_content|}}}|{{{additional_content}}}}}
    <header>Attributes</header>
{{#if:{{{header3|}}}|
    <data source="height"><label>Height</label></data>
<tr>
    <data source="weight"><label>Weight</label></data>
<th colspan="2" class="infobox-subheader" style="text-align:center; background-color:#eaecf0; padding:0.25em;">{{{header3}}}</th>
    <data source="hair"><label>Hair color</label></data>
</tr>}}
    <data source="eyes"><label>Eye color</label></data>
{{#if:{{{additional_content2|}}}|{{{additional_content2}}}}}
</group>
{{#if:{{{below|}}}|
</infobox>
<tr>
<noinclude>{{Infobox person
<td colspan="2" class="infobox-below" style="text-align:center; padding:0.25em;">{{{below}}}</td>
| name = Parvej Husen Talukder
</tr>}}
| image = Parvej_Husen_Talukder.jpg
</table><noinclude>
| caption = Parvej Husen Talukder
 
| gender = Male
[[Category:Infobox templates]]
| birth_name = Md. Parvej Husen Talukder
[[Category:Layout templates]]
| birth_date = August 23, 2005
[[Category:Base templates]]
| birth_place = Jatichar, Derai Upazila, Sunamganj, Bangladesh
 
| parents = Md. Abul Kashem Talukder (father), Sultana Parvin (mother)
== Description ==
| nationality = Bangladeshi
This is the base template for all infoboxes. It provides a standardized structure and styling for information boxes across the wiki.
| occupation = Poet, Children's Writer, Journalist, Internet Entrepreneur
 
| years_active = 2019–present
== Usage ==
| known_for = Founder of Kavya Kishor International, Creator of WikiGenius, "The King Rhymester of Haor Region"
This template is not meant to be used directly on articles. Instead, use specialized infobox templates for specific article types.
| notable_works = "Chorar Jhalak", "The Imperfect Desires of Life"
 
| website = https://parvejhusentalukder.com
If you need to create a new infobox template, you can build upon this base template. Here's an example of how to create a derived infobox:
 
<pre>
{{Infobox
|title = {{#if:{{{name|}}}|{{{name}}}|{{PAGENAME}}}}
|image = {{{image|}}}
|image_size = {{{image_size|}}}
|caption = {{{caption|}}}
|content =  
{{#if:{{{field1|}}}|
<tr>
<td class="infobox-label">Field 1</td>
<td class="infobox-data">{{{field1}}}</td>
</tr>
}}
}}
{{#if:{{{field2|}}}|
<tr>
<td class="infobox-label">Field 2</td>
<td class="infobox-data">{{{field2}}}</td>
</tr>
}}
<!-- Add more fields as needed -->
}}
</pre>
== Parameters ==
* '''title''' - Title of the infobox (defaults to page name if not specified)
* '''above''' - Text to display above the title
* '''image''' - Filename of an image to display (without the File: prefix)
* '''image_size''' - Size of the image (defaults to 250px if not specified)
* '''caption''' - Caption text for the image
* '''header1''' - First section header
* '''content''' - Main content of the infobox (typically rows of label/data pairs)
* '''header2''' - Second section header
* '''additional_content''' - Additional content after header2
* '''header3''' - Third section header
* '''additional_content2''' - Additional content after header3
* '''below''' - Text to display at the bottom of the infobox
== Styling ==
This template uses standardized classes for consistent styling:
* '''.infobox-title''' - The main title at the top
* '''.infobox-above''' - The text above the title
* '''.infobox-image''' - The main image container
* '''.infobox-subheader''' - Section headers within the infobox
* '''.infobox-label''' - The left column labels
* '''.infobox-data''' - The right column data
* '''.infobox-full-data''' - Data that spans both columns
* '''.infobox-below''' - The text at the bottom
== Example ==
Here is an example of how a derived infobox template might be structured:
<pre>
{{Infobox
|title = Example Item
|image = Example.jpg
|image_size = 220px
|caption = An example item
|header1 = Basic Information
|content =
<tr>
<td class="infobox-label">Type</td>
<td class="infobox-data">Example type</td>
</tr>
<tr>
<td class="infobox-label">Created</td>
<td class="infobox-data">2025</td>
</tr>
|header2 = Additional Details
|additional_content =
<tr>
<td class="infobox-label">Feature</td>
<td class="infobox-data">Example feature</td>
</tr>
|below = This is an example only.
}}
</pre>
<templatedata>
{
  "description": "Base template for all infoboxes on the wiki. Not meant to be used directly on articles.",
  "params": {
    "title": {
      "label": "Title",
      "description": "Title displayed at the top of the infobox (defaults to page name if not specified)",
      "type": "string"
    },
    "above": {
      "label": "Above",
      "description": "Text to display above the title",
      "type": "string"
    },
    "image": {
      "label": "Image",
      "description": "Filename of an image to display (without the File: prefix)",
      "type": "string"
    },
    "image_size": {
      "label": "Image size",
      "description": "Width of the image in pixels (px)",
      "type": "string",
      "default": "250px"
    },
    "caption": {
      "label": "Caption",
      "description": "Caption text for the image",
      "type": "string"
    },
    "header1": {
      "label": "Header 1",
      "description": "First section header",
      "type": "string"
    },
    "content": {
      "label": "Content",
      "description": "Main content of the infobox (typically rows of label/data pairs)",
      "type": "string"
    },
    "header2": {
      "label": "Header 2",
      "description": "Second section header",
      "type": "string"
    },
    "additional_content": {
      "label": "Additional content",
      "description": "Additional content after header2",
      "type": "string"
    },
    "header3": {
      "label": "Header 3",
      "description": "Third section header",
      "type": "string"
    },
    "additional_content2": {
      "label": "Additional content 2",
      "description": "Additional content after header3",
      "type": "string"
    },
    "below": {
      "label": "Below",
      "description": "Text to display at the bottom of the infobox",
      "type": "string"
    }
  }
}
</templatedata>
</noinclude>
</noinclude>

Revision as of 20:50, 10 June 2025

{{#if:| }} {{#if:| }} {{#if:| }} {{#if:| }} {{#if:|{{{additional_content}}}}} {{#if:| }} {{#if:|{{{additional_content2}}}}} {{#if:| }}
{{#if:|{{{title}}}|Infobox person}}
{{{above}}}
[[File:{{{image}}}|{{#if:|{{{image_size}}}|250px}}]]{{#if:|
{{{caption}}}}}
{{{header1}}}
{{{header2}}}
{{{header3}}}
{{{below}}}

Description

This is the base template for all infoboxes. It provides a standardized structure and styling for information boxes across the wiki.

Usage

This template is not meant to be used directly on articles. Instead, use specialized infobox templates for specific article types.

If you need to create a new infobox template, you can build upon this base template. Here's an example of how to create a derived infobox:

{{Infobox
|title = {{#if:{{{name|}}}|{{{name}}}|{{PAGENAME}}}}
|image = {{{image|}}}
|image_size = {{{image_size|}}}
|caption = {{{caption|}}}
|content = 
{{#if:{{{field1|}}}|
<tr>
<td class="infobox-label">Field 1</td>
<td class="infobox-data">{{{field1}}}</td>
</tr>
}}
{{#if:{{{field2|}}}|
<tr>
<td class="infobox-label">Field 2</td>
<td class="infobox-data">{{{field2}}}</td>
</tr>
}}
<!-- Add more fields as needed -->
}}

Parameters

  • title - Title of the infobox (defaults to page name if not specified)
  • above - Text to display above the title
  • image - Filename of an image to display (without the File: prefix)
  • image_size - Size of the image (defaults to 250px if not specified)
  • caption - Caption text for the image
  • header1 - First section header
  • content - Main content of the infobox (typically rows of label/data pairs)
  • header2 - Second section header
  • additional_content - Additional content after header2
  • header3 - Third section header
  • additional_content2 - Additional content after header3
  • below - Text to display at the bottom of the infobox

Styling

This template uses standardized classes for consistent styling:

  • .infobox-title - The main title at the top
  • .infobox-above - The text above the title
  • .infobox-image - The main image container
  • .infobox-subheader - Section headers within the infobox
  • .infobox-label - The left column labels
  • .infobox-data - The right column data
  • .infobox-full-data - Data that spans both columns
  • .infobox-below - The text at the bottom

Example

Here is an example of how a derived infobox template might be structured:

{{Infobox
|title = Example Item
|image = Example.jpg
|image_size = 220px
|caption = An example item
|header1 = Basic Information
|content = 
<tr>
<td class="infobox-label">Type</td>
<td class="infobox-data">Example type</td>
</tr>
<tr>
<td class="infobox-label">Created</td>
<td class="infobox-data">2025</td>
</tr>
|header2 = Additional Details
|additional_content = 
<tr>
<td class="infobox-label">Feature</td>
<td class="infobox-data">Example feature</td>
</tr>
|below = This is an example only.
}}

<templatedata> {

 "description": "Base template for all infoboxes on the wiki. Not meant to be used directly on articles.",
 "params": {
   "title": {
     "label": "Title",
     "description": "Title displayed at the top of the infobox (defaults to page name if not specified)",
     "type": "string"
   },
   "above": {
     "label": "Above",
     "description": "Text to display above the title",
     "type": "string"
   },
   "image": {
     "label": "Image",
     "description": "Filename of an image to display (without the File: prefix)",
     "type": "string"
   },
   "image_size": {
     "label": "Image size",
     "description": "Width of the image in pixels (px)",
     "type": "string",
     "default": "250px"
   },
   "caption": {
     "label": "Caption",
     "description": "Caption text for the image",
     "type": "string"
   },
   "header1": {
     "label": "Header 1",
     "description": "First section header",
     "type": "string"
   },
   "content": {
     "label": "Content",
     "description": "Main content of the infobox (typically rows of label/data pairs)",
     "type": "string"
   },
   "header2": {
     "label": "Header 2",
     "description": "Second section header",
     "type": "string"
   },
   "additional_content": {
     "label": "Additional content",
     "description": "Additional content after header2",
     "type": "string"
   },
   "header3": {
     "label": "Header 3",
     "description": "Third section header",
     "type": "string"
   },
   "additional_content2": {
     "label": "Additional content 2",
     "description": "Additional content after header3",
     "type": "string"
   },
   "below": {
     "label": "Below",
     "description": "Text to display at the bottom of the infobox",
     "type": "string"
   }
 }

} </templatedata>