Difference between revisions of "Template:Gallery"

From LAH Wiki
Jump to: navigation, search
(New page: {| style="width:{{{width}}}; border:1px solid dimgray; text-align:center; valign:center" align={{#if:{{{align|}}}|{{{align}}}|center}} | {| style="width:25%; border:1px dotted dimgray; bac...)
 
(Fix (I hope))
 
Line 1: Line 1:
{| style="width:{{{width}}}; border:1px solid dimgray; text-align:center; valign:center" align={{#if:{{{align|}}}|{{{align}}}|center}}
+
{| style="#if:{{{width|}}}|width:{{{width}}}}; border:1px solid dimgray; text-align:center; valign:center" align={{#if:{{{align|}}}|{{{align}}}|center}}  
|
+
|colspan=10|<includeonly>{{#if:{{{heading|}}}|{{{heading}}}}}</includeonly><noinclude>'''Heading'''</noinclude>
{| style="width:25%; border:1px dotted dimgray; background:black"
+
|<includeonly> [[Image:{{{image1}}}|{{#if:{{{imagewidth|}}}|{{{imagewidth}}}|100px}}]]</includeonly> <noinclude>[[Image:ExampleAvvy.png|100px]]</noinclude>
+
 
|-
 
|-
|<includeonly>{{{caption1}}}</includeonly><noinclude>Caption</noinclude>
 
|}
 
 
|
 
|
{| style="width:25%; border:1px dotted dimgray; background:black"
+
{|cellpadding=0 cellspacing=0<!--
|<includeonly> [[Image:{{{image2}}}|{{#if:{{{imagewidth|}}}|{{{imagewidth}}}|100px}}]]</includeonly> <noinclude>[[Image:ExampleAvvy.png|100px]]</noinclude>
+
 
|-
+
 
|<includeonly>{{{caption2}}}</includeonly><noinclude>Caption</noinclude>
+
*Image 1*
 +
 
 +
-->
 +
|<includeonly>{{#if:{{{image1|}}}|<!--
 +
 
 +
--><table align=left text-align=center cellpadding=3 style="background:black; border:1px dotted gray"><tr><td>[[Image:{{{image1}}}|{{#if:{{{imagewidth|}}}|{{{imagewidth}}}|100px}}]]
 +
</td></tr><tr><td>{{#if:{{{caption1|}}}|{{{caption1}}}}}</td></tr></table>}}</includeonly><!--
 +
 
 +
--><noinclude><table align=left text-align=center cellpadding=3 style="background:black; border:1px dotted gray"><tr><td>[[Image:ExampleAvvy.png|100px]]</td></tr><tr><td>Caption</td></tr></table></noinclude><!--
 +
 
 +
 
 +
*Image 2*
 +
 
 +
-->
 +
|<includeonly>{{#if:{{{image2|}}}|<!--
 +
 
 +
--> <table align=left text-align=center cellpadding=3 style="background:black; border:1px dotted gray"><tr><td>[[Image:{{{image2}}}|{{#if:{{{imagewidth|}}}|{{{imagewidth}}}|100px}}]]
 +
</td></tr><tr><td>{{#if:{{{caption2|}}}|{{{caption2}}}}}</td></tr></table>}}</includeonly><!--
 +
 
 +
--><noinclude><table align=left text-align=center cellpadding=3 style="background:black; border:1px dotted gray"><tr><td>[[Image:ExampleAvvy.png|100px]]</td></tr><tr><td>Caption</td></tr></table></noinclude><!--
 +
 
 +
 
 +
*Image 3*
 +
 
 +
-->
 +
|<includeonly>{{#if:{{{image3|}}}|<!--
 +
 
 +
--> <table align=left text-align=center cellpadding=3 style="background:black; border:1px dotted gray"><tr><td>[[Image:{{{image3}}}|{{#if:{{{imagewidth|}}}|{{{imagewidth}}}|100px}}]]
 +
</td></tr><tr><td>{{#if:{{{caption3|}}}|{{{caption3}}}}}</td></tr></table>}}</includeonly><!--
 +
 
 +
--><noinclude><table align=left text-align=center cellpadding=3 style="background:black; border:1px dotted gray"><tr><td>[[Image:ExampleAvvy.png|100px]]</td></tr><tr><td>Caption</td></tr></table></noinclude><!--
 +
 
 +
 
 +
*Image 4*
 +
 
 +
-->
 +
|<includeonly>{{#if:{{{image4|}}}|<!--
 +
 
 +
--> <table align=left text-align=center cellpadding=3 style="background:black; border:1px dotted gray"><tr><td>[[Image:{{{image4}}}|{{#if:{{{imagewidth|}}}|{{{imagewidth}}}|100px}}]]
 +
</td></tr><tr><td>{{#if:{{{caption4|}}}|{{{caption4}}}}}</td></tr></table>}}</includeonly><!--
 +
 
 +
--><noinclude><table align=left text-align=center cellpadding=3 style="background:black; border:1px dotted gray"><tr><td>[[Image:ExampleAvvy.png|100px]]</td></tr><tr><td>Caption</td></tr></table></noinclude><!--
 +
 
 +
 
 +
*Image 5*
 +
 
 +
-->
 +
|<includeonly>{{#if:{{{image5|}}}|<!--
 +
 
 +
--> <table align=left text-align=center cellpadding=3  style="background:black; border:1px dotted gray"><tr><td>[[Image:{{{image5}}}|{{#if:{{{imagewidth|}}}|{{{imagewidth}}}|100px}}]]
 +
</td></tr><tr><td>{{#if:{{{caption5|}}}|{{{caption5}}}}}</td></tr></table>}}</includeonly><!--
 +
 
 +
--><noinclude><table align=left text-align=center cellpadding=3 style="background:black; border:1px dotted gray"><tr><td>[[Image:ExampleAvvy.png|100px]]</td></tr><tr><td>Caption</td></tr></table></noinclude>
 
|}
 
|}
|
 
{| style="width:25%; border:1px dotted dimgray; background:black"
 
|<includeonly> [[Image:{{{image3}}}|{{#if:{{{imagewidth|}}}|{{{imagewidth}}}|100px}}]]</includeonly> <noinclude>[[Image:ExampleAvvy.png|100px]]</noinclude>
 
|-
 
|<includeonly>{{{caption3}}}</includeonly><noinclude>Caption</noinclude>
 
|}
 
|
 
{| style="width:25%; border:1px dotted dimgray; background:black"
 
|<includeonly> [[Image:{{{image4}}}|{{#if:{{{imagewidth|}}}|{{{imagewidth}}}|100px}}]]</includeonly> <noinclude>[[Image:ExampleAvvy.png|100px]]</noinclude>
 
|-
 
|<includeonly>{{{caption4}}}</includeonly><noinclude>Caption</noinclude>
 
 
|}
 
|}
|}<noinclude>
+
<noinclude>
 
==Usage==
 
==Usage==
This is a template for including a gallery of images within an article.   
+
This is a template for including a gallery of images within an article.  It can include up to 5 images, with or without captions
  
*'''width''' - the gallery's
+
*'''width''' - the width of the gallery
*'''align''' - the gallery's alignment.  if left blank, will default to center
+
*'''align''' - how the gallery aligns on the page.  if left blank, will default to center
 
*'''imagewidth''' - the width of each image.  if left blank, will default to 100px
 
*'''imagewidth''' - the width of each image.  if left blank, will default to 100px
 +
*'''heading''' - the heading for the
 
*'''image1''' - the first image
 
*'''image1''' - the first image
 
*'''caption1''' - the caption for the first image
 
*'''caption1''' - the caption for the first image
Line 39: Line 77:
 
*'''image4''' - the fourth image
 
*'''image4''' - the fourth image
 
*'''caption4''' - the caption for the fourth image
 
*'''caption4''' - the caption for the fourth image
 +
*'''image5''' - the fourth image
 +
*'''caption5''' - the caption for the fourth image
  
 
==Code==
 
==Code==
Line 46: Line 86:
 
|width=
 
|width=
 
|align=
 
|align=
 +
|heading=
 
|imagewidth=
 
|imagewidth=
 
|image1=
 
|image1=
Line 55: Line 96:
 
|image4=
 
|image4=
 
|caption4=
 
|caption4=
 +
|image5=
 +
|caption5=
 
}}</pre>
 
}}</pre>
  
 
[[Category:Formatting templates]]
 
[[Category:Formatting templates]]
 
</noinclude>
 
</noinclude>

Latest revision as of 14:35, 4 October 2007

Personal tools