Difference between revisions of "Template:Family Infobox"

From Discovery Wiki
Jump to navigationJump to search
(test creation)
 
(Fixing templates that include categories when transcluding themselves.)
 
(7 intermediate revisions by one other user not shown)
Line 2: Line 2:
 
{| class="infobox bordered" style="float: right; background-color:14193F; margin-left: 1em; margin-bottom: 10px; width: 270px; font-size: 11px; line-height: 14px; border: 1px solid #dddddd;" cellpadding="3"
 
{| class="infobox bordered" style="float: right; background-color:14193F; margin-left: 1em; margin-bottom: 10px; width: 270px; font-size: 11px; line-height: 14px; border: 1px solid #dddddd;" cellpadding="3"
 
|-
 
|-
| colspan="2" class="infobox-name" | '''{{{name}}}'''
+
| colspan="2" class="infobox-name" | '''{{{name}}}''' {{#switch: {{{image}}} | none = | #default = <br />
|-
+
{{!}}-
| colspan="2" style="padding: 0px; text-align: center;" | {{#if: {{{image|}}}
+
{{!}} colspan="2" style="padding: 0px; text-align: center;" {{!}} {{#if: {{{image|}}}
 
| [[image:{{{image}}}|center|264px]]
 
| [[image:{{{image}}}|center|264px]]
 
| [[Image:Nocharimage.jpg|center|264px]]
 
| [[Image:Nocharimage.jpg|center|264px]]
 
}}
 
}}
|-
+
{{!}}-
| colspan="2" class="infobox-section" | Details
+
{{!}} colspan="2" class="infobox-section" {{!}} Details
 +
}}
 
|-
 
|-
 
| class="infobox-data-title" | '''Origin'''
 
| class="infobox-data-title" | '''Origin'''
Line 17: Line 18:
 
{{!}} class="infobox-data-title" {{!}} '''Occupation'''
 
{{!}} class="infobox-data-title" {{!}} '''Occupation'''
 
{{!}} style="padding-right: 1em;" {{!}} {{{occupation}}}
 
{{!}} style="padding-right: 1em;" {{!}} {{{occupation}}}
 +
}}{{#if: {{{affiliation|}}}|<br />
 +
{{!}}-
 +
{{!}} class="infobox-data-title" {{!}} '''Affiliation'''
 +
{{!}} style="padding-right: 1em;" {{!}} {{{affiliation}}}
 
}}
 
}}
 
|-
 
|-
| class="infobox-data-title" | '''Affiliation'''
+
!colspan="2" class="infobox-section" |Members
| style="padding-right: 1em;" | {{#if: {{{affiliation|}}}
 
| {{{affiliation}}}
 
| ''unknown''
 
}}
 
|-
 
!colspan="2"!Members
 
 
|-
 
|-
 
|colspan="2"|{{#if: {{{members|}}}
 
|colspan="2"|{{#if: {{{members|}}}
Line 32: Line 31:
 
}}
 
}}
 
|}
 
|}
[[Category:People]]{{#if: {{{image|}}} | | [[Category: Pages without profile images]]}}
+
{{#ifeq:{{NAMESPACE}}|Template||[[Category:Families]]{{#switch: {{{image}}} | none = | #default = {{#if: {{{image|}}} | | [[Category: Pages without profile images]]}}}}}}
 
<noinclude>
 
<noinclude>
 
-->
 
-->
 
==Usage==
 
==Usage==
<pre><nowiki>{{Family_Infobox
+
<pre><nowiki>{{Family Infobox
 
| name = The Addams Family
 
| name = The Addams Family
 
| image =  
 
| image =  
Line 53: Line 52:
 
* Thing
 
* Thing
 
}}</nowiki></pre>
 
}}</nowiki></pre>
 +
 +
Occupation and Affiliation are optional fields, and will not be displayed if they are not filled in.
  
 
==Result==
 
==Result==
{{Family_Infobox
+
{{Family Infobox
 
| name = The Addams Family
 
| name = The Addams Family
 
| image =  
 
| image =  

Latest revision as of 21:05, 24 January 2012

If you want to set the CSS styles of this infobox or colours, get a wiki Admin to change the Monobook.css. Most infoboxes' styles are controlled from there. This allows freedom for skins, while not changing the content of the infobox. (Say for example if you don't like this current one modelled off Freelancer User Interface, and want a default Wiki skin.)

Usage

{{Family Infobox
| name = The Addams Family
| image = 
| origin = {{House Link | Nomads}}
| occupation = Haunting
| affiliation = Semi-lawful
| members =
* Gomez
* Morticia
* Pugsley
* Wednesday
* Uncle Fester
* Grandmama
* Cousin Itt
* Lurch
* Thing
}}

Occupation and Affiliation are optional fields, and will not be displayed if they are not filled in.

Result

The Addams Family
Error creating thumbnail: Unable to save thumbnail to destination
Details
Origin Flag-nomads3.png Nomads
Occupation Haunting
Affiliation Semi-lawful
Members
  • Gomez
  • Morticia
  • Pugsley
  • Wednesday
  • Uncle Fester
  • Grandmama
  • Cousin Itt
  • Lurch
  • Thing