Difference between revisions of "Gallery"

From Sega Retro

Line 1: Line 1:
 
<includeonly>{{#fornumargs:galleryindex
 
<includeonly>{{#fornumargs:galleryindex
 
|gallerycontent
 
|gallerycontent
|<div class="templategallery" style="display:inline-block; vertical-align:top; font-size:90%;">[[File:{{#replace:{{#replace:{{#var:gallerycontent}}|¦|{{!}}}}|##|=}}{{!}}120x120px{{!}}thumb]]</div>
+
|{{#vardefine:gallerycontentfile|{{#explode:{{#var:gallerycontent}}|¦|0}}}}{{#ifeq:{{#pos:{{#explode:{{#var:gallerycontent}}|¦|1}}|page#}}|0
 +
|{{#vardefine:gallerycontentpage|{{#replace:{{#explode:{{#var:gallerycontent}}|¦|1}}|#|=}}}}{{#vardefine:gallerycontentcaption|{{#explode:{{#var:gallerycontent}}|¦|2}}}}
 +
|{{#vardefine:gallerycontentpage|}}{{#vardefine:gallerycontentcaption|{{#explode:{{#var:gallerycontent}}|¦|1}}}}
 +
}}<div style="display:inline-block; vertical-align:top; font-size:90%;"><div style="min-width:150px; min-height:150px; border:solid silver 1px; display:block; text-align:center; margin-left:9px; padding:15px; font-size:0px;">[[File:{{#var:gallerycontentfile}}|120x120px|{{#var:gallerycontentpage}}]]</div><div style="width:150px; margin:9px;">{{#var:gallerycontentcaption}}</div></div>
 
}}</includeonly><noinclude>
 
}}</includeonly><noinclude>
 
==Usage==
 
==Usage==
 
{{gallery
 
{{gallery
|sonic1_title.png¦caption
+
|sonic1_title.png¦''Sonic the Hedgehog'' title screen
|Mega UK 01.pdf¦page##10-11¦caption2 caption2 caption2 caption2 caption2 caption2 caption2 caption2 caption2 caption2 caption2 caption2 caption2 caption2 caption2
+
|Mega UK 01.pdf¦page#10-11¦Two pages from a UK magazine
 
}}
 
}}
 
</noinclude>
 
</noinclude>

Revision as of 16:54, 24 June 2016

Usage

Sonic1 title.png
Sonic the Hedgehog title screen
Two pages from a UK magazine