Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Infobox: Difference between revisions

Template page
Ezoiar (talk | contribs)
mNo edit summary
Tag: Reverted
Ezoiar (talk | contribs)
m Reverted edits by Ezoiar (talk) to last revision by M88youngling
Tag: Rollback
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
Apologies for the oversight. Let's correct that. Here's the fixed template:
<onlyinclude>{| class="wikia-infobox"


```wiki
<div class="infobox" style="float: right; margin-left: 15px; margin-bottom: 15px; border: 1px solid #aaa; background-color: #f9f9f9;">
{| class="infobox"
|-
|-
! colspan="2" style="text-align: center; font-size: larger; font-weight: bold; background-color: #ccccff;" | {{{title|''Unknown''}}}
! class="wikia-infobox-header" colspan="2" | {{{title|''Unknown''}}}
 
|-
|-
{{#if: {{{image|}}} |
{{#if: {{{image|}}} |
{{!}} colspan="2" style="text-align: center;" | [[File:{{{image}}}|{{{imagewidth|210}}}px|alt={{{imagecaption|}}}]]
{{!}} class="wikia-infobox-image" colspan="2" {{!}} [[File:{{{image}}}|{{{imagewidth|210}}}px|{{{imagecaption|}}}]]
| }}
| }}
|-
|-
{{#if: {{{imagecaption|}}} |
{{#if: {{{imagecaption|}}} |
{{!}} colspan="2" style="text-align: center; font-style: italic;" | {{{imagecaption}}}
{{!}} class="wikia-infobox-caption" colspan="2" {{!}} {{{imagecaption}}}
| }}
| }}
|-
! colspan="2" | <div class="wikia-infobox-section-header">Clan information</div>
|-
|-
! colspan="2" style="background-color: #eeeeff; text-align: center;" | Clan Information
! Name
|-
! style="background-color: #f2f2f2; width: 30%;" | Name
| {{{name|''Unknown''}}}
| {{{name|''Unknown''}}}
|-
|-
! style="background-color: #f2f2f2; width: 30%;" | Position
! Position
| {{{position|''Unknown''}}}
| {{{position|''Unknown''}}}
|-
|-
! style="background-color: #f2f2f2; width: 30%;" | Age
! Age
| {{{age|''Unknown''}}}
| {{{age|''Unknown''}}}
|-
|-
! style="background-color: #f2f2f2; width: 30%;" | Status
! Status
| {{{status|''Unknown''}}}
| {{{status|''Unknown''}}}
|-
|-
! style="background-color: #f2f2f2; width: 30%;" | Home Country
! Home Country
| {{{home country|''Unknown''}}}
| {{{home country|''Unknown''}}}
|-
! colspan="2" | <div class="wikia-infobox-section-header">Other attributes</div>
|-
|-
! colspan="2" style="background-color: #eeeeff; text-align: center;" | Other Attributes
{{#if: {{{fourth|}}} |
{{#if: {{{fourth|}}} |
! Fourth
{{!}} {{{fourth}}}
| }}
|-
|-
! style="background-color: #f2f2f2; width: 30%;" | Fourth
| {{{fourth}}}
}}
{{#if: {{{fifth|}}} |
{{#if: {{{fifth|}}} |
! Fifth
{{!}} {{{fifth}}}
| }}
|-
|-
! style="background-color: #f2f2f2; width: 30%;" | Fifth
| {{{fifth}}}
}}
{{#if: {{{sixth|}}} |
{{#if: {{{sixth|}}} |
|-
! Sixth
! style="background-color: #f2f2f2; width: 30%;" | Sixth
{{!}} {{{sixth}}}
| {{{sixth}}}
| }}
}}
 
|}
|- style="font-size:0; line-height:0;"
</div>
! style="width:50%; padding:0" |
```
! style="width:50%; padding:0" |


I've adjusted the conditional statements to ensure that the unwanted code is not displayed. This should resolve the issue.
|}</onlyinclude><noinclude><br style="clear:both;"/>
{{documentation}}</noinclude>

Latest revision as of 11:34, 6 March 2024

Unknown
Clan information
Name Unknown
Position Unknown
Age Unknown
Status Unknown
Home Country Unknown
Other attributes


Template documentation follows
Note: the template above may sometimes be partially or fully invisible.
Visit Template:Infobox/doc to edit this documentation. (How does this work?)

Description

This template is a sample infobox, to aid in the creation of new infoboxes.

Recommended usage: copy the template code to a new template page, and edit it there.

Infobox and template background

See Help:Templates, Help:Infobox and Help:Tables for some background on how templates and infoboxes work.

Building blocks

The infobox is made of the following basic building blocks:

  • Overall table class: class="wikia-infobox"
  • Table heading cell class: class="wikia-infobox-header"
  • Use row header marks ("!") for row title cells (and "|" for normal cells)
  • Section separator line: give the header below it a wrapping div with class="wikia-infobox-section-header"
  • Image cell class: class="wikia-infobox-image"
  • Image caption cell class: class="wikia-infobox-caption"

Other notes

  • The Title, First, Second, and Third rows show "Unknown" if their values are not specified.
  • The Image, Imagecaption, Fourth, Fifth, and Sixth rows won't show up if their values are not specified: they are each completely enclosed in an 'if' statement.

Syntax

{{infobox
 | title         = 
 | image         = [e.g. "Example.jpg"]
 | imagewidth    = [e.g. "150"] [default: 210 pixels]
 | imagecaption  = 
 | first         =
 | second        =
 | third         =
 | fourth        =
 | fifth         =
 | sixth         =
}}

Samples

{{infobox
 | title         = A pretty flower
 | image         = Example.jpg
 | imagewidth    = 100
 | imagecaption  = Floweris flowerum
 | first         = Pink and green
 | second        = Outdoors
 | fourth        = Annual
}}

Results in...

A pretty flower
Floweris flowerum
Floweris flowerum
Clan information
Name Unknown
Position Unknown
Age Unknown
Status Unknown
Home Country Unknown
Other attributes
Fourth Annual