Template:Example: Difference between revisions

From The Reed and Rite
mNo edit summary
m Removed background color to allow dynamic color shift in dark mode.
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><div style="width: 300px; background: #f8f9fa; border: 1px solid #aaa; padding: 0.5em; float: right; margin: -1.5em 0 1.5em 1em; vertical-align: top; display: inline-block; clear: right; position: relative; top: 1.5em;">
<includeonly>{{Infobox<!--
  <table style="width: 100%; border-spacing: 0; margin: 0; background-color: #f8f9fa;">
-->| name = {{{name|}}}<!--
    <!-- Name -->
-->| image = {{{image|}}}<!--
    <tr>
-->| caption = {{{caption|}}}<!--
      <td colspan="2" style="text-align: center; background-color: #f8f9fa; font-size: 120%; font-weight: bold; padding: 0;">{{{name|No name provided}}}</td>
-->| data_rows =<!--
    </tr>
-->{{#if: {{{born|}}} |<tr class="infobox-data-row"><th>Born</th><td>{{{born}}}</td></tr>}}<!--
    <!-- Image -->
-->{{#if: {{{died|}}} |<tr class="infobox-data-row"><th>Died</th><td>{{{died}}}</td></tr>}}<!--
    {{#if: {{{image|}}} |
-->{{#if: {{{spouse|}}} |<tr class="infobox-data-row"><th>Spouse</th><td>{{{spouse}}}</td></tr>}}<!--
    <tr>
-->{{#if: {{{parents|}}} |<tr class="infobox-data-row"><th>Parents</th><td>{{{parents}}}</td></tr>}}<!--
      <td colspan="2" style="text-align: center; padding: 0; background-color: #f8f9fa;">
-->{{#if: {{{children|}}} |<tr class="infobox-data-row"><th>Children</th><td>{{{children}}}</td></tr>}}<!--
        <div style="display: block; margin: auto; padding: 0.5em 0; background-color: #f8f9fa;">
-->{{#if: {{{relatives|}}} |<tr class="infobox-data-row"><th>Relatives</th><td>{{{relatives}}}</td></tr>}}<!--
          [[File:{{{image}}}|200px|center|alt={{{caption|}}}|{{{caption|}}}]]
-->{{#if: {{{profession|}}} |<tr class="infobox-data-row"><th>Profession</th><td>{{{profession}}}</td></tr>}}<!--
        </div>
-->{{#if: {{{titles|}}} |<tr class="infobox-data-row"><th>Titles</th><td>{{{titles}}}</td></tr>}}<!--
      </td>
-->{{#if: {{{monikers|}}} |<tr class="infobox-data-row"><th>Monikers</th><td>{{{monikers}}}</td></tr>}}<!--
    </tr>
-->{{#if: {{{groups|}}} |<tr class="infobox-data-row"><th>Groups</th><td>{{{groups}}}</td></tr>}}<!--
    }}
-->{{#if: {{{introduced|}}} |<tr class="infobox-data-row"><th>Introduced</th><td>{{{introduced}}}</td></tr>}}<!--
    <!-- Image Caption -->
-->{{#if: {{{first_mentioned|}}} |<tr class="infobox-data-row"><th>First Mentioned</th><td>{{{first_mentioned}}}</td></tr>}}<!--
    {{#if: {{{caption|}}} |
-->{{#if: {{{last_mentioned|}}} |<tr class="infobox-data-row"><th>Last Mentioned</th><td>{{{last_mentioned}}}</td></tr>}}
    <tr>
}}</includeonly><noinclude>
      <td colspan="2" style="text-align: center; font-size: 80%; font-style: italic; color: #000000; background-color: #f8f9fa; padding: 0.1em 0;">{{{caption}}}</td>
== Description ==
    </tr>
This template should be used for demonstration purposes only, such as in the Help Guide. It is an exact copy of the Character Template with the category tags removed.
    }}
 
    <!-- Data Rows -->
== Usage ==
    {{#if: {{{born|}}} |
This template has several [[:Template:Character#Parameters|parameters]] that can be used.
    <tr>
: '''Note: Only parameters that are provided will appear in the infobox. Not all parameters are required for each character.'''
      <td style="font-weight: bold; padding: 0.1em; vertical-align: top; width: 35%;">Born</td>
 
      <td style="padding: 0.1em;">{{{born}}}</td>
{| style="width: 100%; text-align: left; margin: auto;" class="wikitable"
    </tr>
|-
    }}
! width=50%|You Type
    {{#if: {{{died|}}} |
!You Get
    <tr>
|-
      <td style="font-weight: bold; padding: 0.1em; vertical-align: top; width: 35%;">Died</td>
| style="text-align: left; vertical-align: top;" |<pre>
      <td style="padding: 0.1em;">{{{died}}}</td>
{{example
    </tr>
|name=Character Name
    }}
|image=FILENAME.EXTENSION
    {{#if: {{{spouse|}}} |
|caption=Caption Here
    <tr>
|born=Date of Birth
      <td style="font-weight: bold; padding: 0.1em; vertical-align: top; width: 35%;">Spouse</td>
|died=Date of Death
      <td style="padding: 0.1em;">{{{spouse}}}</td>
|spouse=Spouse's Name
    </tr>
|parents=Parent Names
    }}
|children=Children Names
    {{#if: {{{parents|}}} |
|relatives=Relatives Names
    <tr>
|profession=Profession Here
      <td style="font-weight: bold; padding: 0.1em; vertical-align: top; width: 35%;">Parents</td>
|titles=Titles Here
      <td style="padding: 0.1em;">{{{parents}}}</td>
|monikers=Monikers Here
    </tr>
|groups=Group Affiliations
    }}
|introduced=First Appearance
    {{#if: {{{children|}}} |
|first_mentioned=First Mentioned
    <tr>
|last_mentioned=Last Mentioned
      <td style="font-weight: bold; padding: 0.1em; vertical-align: top; width: 35%;">Children</td>
}}
      <td style="padding: 0.1em;">{{{children}}}</td>
</pre>
    </tr>
|<br>{{example
    }}
    {{#if: {{{relatives|}}} |
    <tr>
      <td style="font-weight: bold; padding: 0.1em; vertical-align: top; width: 35%;">Relatives</td>
      <td style="padding: 0.1em;">{{{relatives}}}</td>
    </tr>
    }}
    {{#if: {{{profession|}}} |
    <tr>
      <td style="font-weight: bold; padding: 0.1em; vertical-align: top; width: 35%;">Profession</td>
      <td style="padding: 0.1em;">{{{profession}}}</td>
    </tr>
    }}
    {{#if: {{{titles|}}} |
    <tr>
      <td style="font-weight: bold; padding: 0.1em; vertical-align: top; width: 35%;">Titles</td>
      <td style="padding: 0.1em;">{{{titles}}}</td>
    </tr>
    }}
    {{#if: {{{monikers|}}} |
    <tr>
      <td style="font-weight: bold; padding: 0.1em; vertical-align: top; width: 35%;">Monikers</td>
      <td style="padding: 0.1em;">{{{monikers}}}</td>
    </tr>
    }}
    {{#if: {{{groups|}}} |
    <tr>
      <td style="font-weight: bold; padding: 0.1em; vertical-align: top; width: 35%;">Groups</td>
      <td style="padding: 0.1em;">{{{groups}}}</td>
    </tr>
    }}
    {{#if: {{{introduced|}}} |
    <tr>
      <td style="font-weight: bold; padding: 0.1em; vertical-align: top; width: 35%;">Introduced</td>
      <td style="padding: 0.1em;">{{{introduced}}}</td>
    </tr>
    }}
    {{#if: {{{last_mentioned|}}} |
    <tr>
      <td style="font-weight: bold; padding: 0.1em; vertical-align: top; width: 35%;">Last Mentioned</td>
      <td style="padding: 0.1em;">{{{last_mentioned}}}</td>
    </tr>
    }}
  </table>
</div>
</includeonly><noinclude>
{{Character
| name = Example Infobox
| name = Example Infobox
| image = Pen.png
| image = pen.png
| caption = Caption Here
| caption = Caption Here
| born = Date of Birth
| born = Date of Birth
Line 112: Line 65:
| groups = Group Affiliations
| groups = Group Affiliations
| introduced = First Appearance
| introduced = First Appearance
| first_mentioned = First Mentioned
| last_mentioned = Last Mentioned
| last_mentioned = Last Mentioned
}}
}}
==Summary==
|}
This template should be used for demonstration purposes only, such as in the [[:Category:Help|Help Guide]]. It is an exact copy of the [[:Template:Character|Character Template]] with the category tags removed.
 
=== Usage ===
The template has several [[:Template:Character#Parameters|parameters]] that can be used. '''Note: Only fields that are provided will appear in the infobox.''' Not all parameters are required for each character.
<pre>
{{Example
| name = Character Name
| image = FILENAME.EXTENSION
| caption = Caption Here
| born = Date of Birth
| died = Date of Death
| spouse = Spouse's Name
| parents = Parent Names
| children = Children Names
| relatives = Relatives Names
| profession = Profession Here
| titles = Titles Here
| monikers = Monikers Here
| groups = Group Affiliations
| introduced = First Appearance
| last_mentioned = Last Mentioned
}}
</pre>


=== Parameters ===
=== Parameters ===
Line 145: Line 76:
| style="text-align: center;" | <code>name</code> || The character's name.
| style="text-align: center;" | <code>name</code> || The character's name.
|-
|-
| style="text-align: center;" | <code>image</code> || Filename of the character's image (e.g., `File:Example.jpg`).
| style="text-align: center;" | <code>image</code> || Filename of the character's image (e.g., "Example.jpg").
|-
|-
| style="text-align: center;" | <code>caption</code> || Caption for the image.
| style="text-align: center;" | <code>caption</code> || Caption for the image.
Line 170: Line 101:
|-
|-
| style="text-align: center;" | <code>introduced</code> || Where the character was first introduced (e.g., book, chapter, etc.).
| style="text-align: center;" | <code>introduced</code> || Where the character was first introduced (e.g., book, chapter, etc.).
|-
| style="text-align: center;" | <code>first_mentioned</code> || Where the character was first mentioned (e.g., book, chapter, etc.).
|-
|-
| style="text-align: center;" | <code>last_mentioned</code> || Where the character was last mentioned (e.g., book, chapter, etc.).
| style="text-align: center;" | <code>last_mentioned</code> || Where the character was last mentioned (e.g., book, chapter, etc.).
Line 175: Line 108:


== Articles using Template ==
== Articles using Template ==
:{{for|Special:WhatLinksHere/{{FULLPAGENAME}}|a full listing|here|pre=This list is limited to 100 pages}}
{{for|Special:WhatLinksHere/{{FULLPAGENAME}}|a full listing|here|pre=This list is limited to 100 pages}}
{{Special:WhatLinksHere/{{FULLPAGENAME}}|namespace=0|limit=100}}
{{Special:WhatLinksHere/{{FULLPAGENAME}}|namespace=0|limit=100}}


[[Category:Infoboxes]]
[[Category:Infoboxes]]
</noinclude>

Latest revision as of 22:40, 27 May 2025

Description

This template should be used for demonstration purposes only, such as in the Help Guide. It is an exact copy of the Character Template with the category tags removed.

Usage

This template has several parameters that can be used.

Note: Only parameters that are provided will appear in the infobox. Not all parameters are required for each character.
You Type You Get
{{example
|name=Character Name
|image=FILENAME.EXTENSION
|caption=Caption Here
|born=Date of Birth
|died=Date of Death
|spouse=Spouse's Name
|parents=Parent Names
|children=Children Names
|relatives=Relatives Names
|profession=Profession Here
|titles=Titles Here
|monikers=Monikers Here
|groups=Group Affiliations
|introduced=First Appearance
|first_mentioned=First Mentioned
|last_mentioned=Last Mentioned
}}

Example Infobox
Caption Here
Caption Here
Caption Here
BornDate of Birth
DiedDate of Death
SpouseSpouse's Name
ParentsParent Names
ChildrenChildren Names
RelativesRelatives Names
ProfessionProfession Here
TitlesTitles Here
MonikersMonikers Here
GroupsGroup Affiliations
IntroducedFirst Appearance
First MentionedFirst Mentioned
Last MentionedLast Mentioned

Parameters

Parameter Description
name The character's name.
image Filename of the character's image (e.g., "Example.jpg").
caption Caption for the image.
born The character's date of birth.
died The character's date of death (if applicable).
spouse The character's spouse (if applicable).
parents The character's parents.
children The character's children.
relatives Other relatives of the character.
profession The character's profession.
titles Titles or honorifics the character holds.
monikers Alternate names or nicknames for the character.
groups Groups or affiliations the character belongs to.
introduced Where the character was first introduced (e.g., book, chapter, etc.).
first_mentioned Where the character was first mentioned (e.g., book, chapter, etc.).
last_mentioned Where the character was last mentioned (e.g., book, chapter, etc.).

Articles using Template