Template:Multiple image: Difference between revisions

From the Super Mario Wiki, the Mario encyclopedia
Jump to navigationJump to search
(like that?)
mNo edit summary
Line 2: Line 2:
<div class="thumbinner" {{#if:{{{background color|}}}|style="background-color:{{{background color}}};"}}>
<div class="thumbinner" {{#if:{{{background color|}}}|style="background-color:{{{background color}}};"}}>
{{#if: {{{header|}}} | <div style="clear:both;font-weight:bold;text-align:{{{header_align|center}}};background:{{{header_background|transparent}}};">{{{header}}}</div> }}
{{#if: {{{header|}}} | <div style="clear:both;font-weight:bold;text-align:{{{header_align|center}}};background:{{{header_background|transparent}}};">{{{header}}}</div> }}
<div style="{{#ifeq: {{{direction|horizontal}}} | horizontal | float:left;}}margin:1px;width:{{#expr: 2 + {{#if: {{{width|}}} | {{{width}}} | {{{width1}}} }} }}px;"><div class="thumbimage">[[File:{{{image1}}}|link={{#switch:{{{link1|!}}}|none=|!=File:{{{image1}}}|#default={{{link1}}}}}|{{#if: {{{width|}}} | {{{width}}} | {{{width1}}} }}px|{{{caption1|{{{footer|}}}}}}]]</div>{{#if: {{{caption1|}}} | <div class="thumbcaption" style="clear:left;">{{{caption1}}}</div>}}</div>
<div style="{{#ifeq: {{{direction|horizontal}}} | horizontal | float:left;}}margin:1px;width:{{#expr: 2 + {{#if: {{{width|}}} | {{{width}}} | {{{width1}}} }} }}px;"><div class="thumbimage">[[File:{{{image1}}}|link={{#switch:{{{link1|a}}}|none=&shy;|a=File:{{{image1}}}|#default={{{link1}}}}}|{{#if: {{{width|}}} | {{{width}}} | {{{width1}}} }}px|{{{caption1|{{{footer|}}}}}}]]</div>{{#if: {{{caption1|}}} | <div class="thumbcaption" style="clear:left;">{{{caption1}}}</div>}}</div>
<div style="{{#ifeq: {{{direction|horizontal}}} | horizontal | float:left;}}margin:1px;width:{{#expr: 2 + {{#if: {{{width|}}} | {{{width}}} | {{{width2}}} }} }}px;"><div class="thumbimage">[[File:{{{image2}}}|link={{#switch:{{{link2|!}}}|none=|!=File:{{{image2}}}|#default={{{link2}}}}|{{#if: {{{width|}}} | {{{width}}} | {{{width2}}} }}px|{{{caption2|{{{footer|}}}}}}]]</div>{{#if: {{{caption2|}}} | <div class="thumbcaption" style="clear:left;">{{{caption2}}}</div>}}</div>
<div style="{{#ifeq: {{{direction|horizontal}}} | horizontal | float:left;}}margin:1px;width:{{#expr: 2 + {{#if: {{{width|}}} | {{{width}}} | {{{width2}}} }} }}px;"><div class="thumbimage">[[File:{{{image2}}}|link={{#switch:{{{link2|a}}}|none=&shy;|a=File:{{{image2}}}|#default={{{link2}}}}|{{#if: {{{width|}}} | {{{width}}} | {{{width2}}} }}px|{{{caption2|{{{footer|}}}}}}]]</div>{{#if: {{{caption2|}}} | <div class="thumbcaption" style="clear:left;">{{{caption2}}}</div>}}</div>
{{#if: {{{image3|}}} | <div style="{{#ifeq: {{{direction|horizontal}}} | horizontal | float:left;}}margin:1px;width:{{#expr: 2 + {{#if: {{{width|}}} | {{{width}}} | {{{width3}}} }} }}px;"><div class="thumbimage">[[File:{{{image3}}}|link={{#switch:{{{link3|!}}}|none=|!=File:{{{image3}}}|#default={{{link3}}}}|{{#if: {{{width|}}} | {{{width}}} | {{{width3}}} }}px|{{{caption3|{{{footer|}}}}}}]]</div>{{#if: {{{caption3|}}} | <div class="thumbcaption" style="clear:left;">{{{caption3}}}</div>}}</div>
{{#if: {{{image3|}}} | <div style="{{#ifeq: {{{direction|horizontal}}} | horizontal | float:left;}}margin:1px;width:{{#expr: 2 + {{#if: {{{width|}}} | {{{width}}} | {{{width3}}} }} }}px;"><div class="thumbimage">[[File:{{{image3}}}|link={{#switch:{{{link3|a}}}|none=&shy;|a=File:{{{image3}}}|#default={{{link3}}}}|{{#if: {{{width|}}} | {{{width}}} | {{{width3}}} }}px|{{{caption3|{{{footer|}}}}}}]]</div>{{#if: {{{caption3|}}} | <div class="thumbcaption" style="clear:left;">{{{caption3}}}</div>}}</div>
{{#if: {{{image4|}}} | <div style="{{#ifeq: {{{direction|horizontal}}} | horizontal | float:left;}}margin:1px;width:{{#expr: 2 + {{#if: {{{width|}}} | {{{width}}} | {{{width4}}} }} }}px;"><div class="thumbimage">[[File:{{{image4}}}|link={{#switch:{{{link4|!}}}|none=|!=File:{{{image4}}}|#default={{{link4}}}}|{{#if: {{{width|}}} | {{{width}}} | {{{width4}}} }}px|{{{caption4|{{{footer|}}}}}}]]</div>{{#if: {{{caption4|}}} | <div class="thumbcaption" style="clear:left;">{{{caption4}}}</div>}}</div>
{{#if: {{{image4|}}} | <div style="{{#ifeq: {{{direction|horizontal}}} | horizontal | float:left;}}margin:1px;width:{{#expr: 2 + {{#if: {{{width|}}} | {{{width}}} | {{{width4}}} }} }}px;"><div class="thumbimage">[[File:{{{image4}}}|link={{#switch:{{{link4|a}}}|none=&shy;|a=File:{{{image4}}}|#default={{{link4}}}}|{{#if: {{{width|}}} | {{{width}}} | {{{width4}}} }}px|{{{caption4|{{{footer|}}}}}}]]</div>{{#if: {{{caption4|}}} | <div class="thumbcaption" style="clear:left;">{{{caption4}}}</div>}}</div>
{{#if: {{{image5|}}} | <div style="{{#ifeq: {{{direction|horizontal}}} | horizontal | float:left;}}margin:1px;width:{{#expr: 2 + {{#if: {{{width|}}} | {{{width}}} | {{{width5}}} }} }}px;"><div class="thumbimage">[[File:{{{image5}}}|link={{#switch:{{{link5|!}}}|none=|!=File:{{{image5}}}|#default={{{link5}}}}|{{#if: {{{width|}}} | {{{width}}} | {{{width5}}} }}px|{{{caption5|{{{footer|}}}}}}]]</div>{{#if: {{{caption5|}}} | <div class="thumbcaption" style="clear:left;">{{{caption5}}}</div>}}</div>}}}}}}
{{#if: {{{image5|}}} | <div style="{{#ifeq: {{{direction|horizontal}}} | horizontal | float:left;}}margin:1px;width:{{#expr: 2 + {{#if: {{{width|}}} | {{{width}}} | {{{width5}}} }} }}px;"><div class="thumbimage">[[File:{{{image5}}}|link={{#switch:{{{link5|a}}}|none=&shy;|a=File:{{{image5}}}|#default={{{link5}}}}|{{#if: {{{width|}}} | {{{width}}} | {{{width5}}} }}px|{{{caption5|{{{footer|}}}}}}]]</div>{{#if: {{{caption5|}}} | <div class="thumbcaption" style="clear:left;">{{{caption5}}}</div>}}</div>}}}}}}
{{#if: {{{footer|}}} | <div class="thumbcaption" style="clear:left;text-align:{{{footer_align|left}}};background:{{{footer_background|transparent}}};">{{{footer}}}</div> }}
{{#if: {{{footer|}}} | <div class="thumbcaption" style="clear:left;text-align:{{{footer_align|left}}};background:{{{footer_background|transparent}}};">{{{footer}}}</div> }}
</div>
</div>

Revision as of 14:10, March 7, 2011

Basic Usage

The multiple image template allows to set two or more images at the same time in a image box, kinda similar to a gallery but without wasting space. You can use up to 10 pictures arranged in a row either horizontally or vertically. Combine the next features to create your own gallery this time! You can go here to see more advanced results or to the {{Multiframe}} template where the images share the same image frame.

{{multiple image
|align = left/center/right
|direction = vertical/horizontal
|header = header for pictures
|footer = A single footer for all the pics
|width = size for all the pictures, use numbers only

| image1 = set a pic
| alt1 = alternate text for pic
| width1 = size for an specific picture, use numbers only
|caption1 = caption for an specific picture

| image2 =
| alt2 = 
| width2 = 
|caption2 = 
}}
Examples
Example 1 Result
{{multiple image
|align = center
|direction = horizontal
|footer = Two Koopa Shells
|width = 100

| image1 = MKwii Greenshell.jpg
| alt1 = green shell

| image2 = MKwii Redshell.jpg
| alt2 = red shell
}}
{{#if: |
[[File:{{{image3}}}|link={{#switch:a|none=­|a=File:{{{image3}}}|#default={{{link3}}}}|100px|Two Koopa Shells]]
{{#if: |
[[File:{{{image4}}}|link={{#switch:a|none=­|a=File:{{{image4}}}|#default={{{link4}}}}|100px|Two Koopa Shells]]
{{#if: |
[[File:{{{image5}}}|link=File:{{{image5}}}}}}}
Two Koopa Shells
Example 2 Result
{{multiple image
|align = center
|direction =vertical
|footer = The Mario Bros.
|width = 100

| image1 = MarioNSMBWii.PNG
| alt1 = Mario

| image2 = LuigiNSMBWii.PNG
| alt2 = Luigi
}}
{{#if: |
[[File:{{{image3}}}|link={{#switch:a|none=­|a=File:{{{image3}}}|#default={{{link3}}}}|100px|The Mario Bros.]]
{{#if: |
[[File:{{{image4}}}|link={{#switch:a|none=­|a=File:{{{image4}}}|#default={{{link4}}}}|100px|The Mario Bros.]]
{{#if: |
[[File:{{{image5}}}|link=File:{{{image5}}}}}}}
The Mario Bros.
Example 3 Result
{{multiple image
|align = right
|direction = horizontal
|footer_align=center
|footer = Marioverse Protagonists

| image1 = MarioNSMBWii.PNG
| alt1 = Mario
| width1 = 80
|caption1 = Mario 

| image2 = LuigiNSMBWii.PNG
| alt2 = Luigi
| width2 = 70
|caption2 = Luigi 

| image3 = NSMBWiiPeach.png
| alt3 = Princess Peach
| width3 = 75
|caption3 = Princess Peach 

| image4 = BowserNSMBWii.png
| alt4 = Bowser
| width4 = 95
|caption4 = Bowser
}}
Mario
Luigi
{{#if: NSMBWiiPeach.png |
Princess Peach
{{#if: BowserNSMBWii.png |
Bowser
{{#if: | <div style="float:left;margin:1px;width:Expression error: Unrecognized punctuation character "{".px;">
[[File:{{{image5}}}|link=File:{{{image5}}}}}}}
Marioverse Protagonists