Difference between revisions of "Template:Lead/GalleryItem"
From Species-ID
m (http://offene-naturfuehrer.de/web/Spezial:Linkliste/Vorlage:Lead/GalleryItem) |
m (reduce template loads {{trim}} → {{#if:alwaystrue-to-trim| …}}) |
||
Line 1: | Line 1: | ||
<includeonly><table style="width:{{#expr:{{{width}}}+4}}px; float:left; border-collapse:collapse; margin:0px;"> | <includeonly><table style="width:{{#expr:{{{width}}}+4}}px; float:left; border-collapse:collapse; margin:0px;"> | ||
<tr><td style="height:{{#expr:{{{height}}}+4}}px; border:none; border-width:0px; padding:0px;"><!-- | <tr><td style="height:{{#expr:{{{height}}}+4}}px; border:none; border-width:0px; padding:0px;"><!-- | ||
− | // TOPCELLCONTENT:-->[[{{ | + | // TOPCELLCONTENT:-->[[{{#if:alwaystrue-to-trim| {{{image|File:MissingImage.jpg}}} }} |center|{{{width}}}x{{{height}}}px|{{{caption}}}]]</td></tr><!-- |
// CAPTION ROW and DIV:--><tr style="vertical-align:top;"><td style="display:block; height:{{#expr:0.1+1.15*{{{lines|2}}}}}em; padding:0px;"><div style="height:{{#expr:0.1+1.15*{{{lines|2}}}}}em; width:{{#expr:{{{width}}}+7}}px; line-height:1.15em; text-align:center; padding:2px 3px 1px 3px; overflow-y:auto; margin:0px; border:none; border-width:0px;">{{ | // CAPTION ROW and DIV:--><tr style="vertical-align:top;"><td style="display:block; height:{{#expr:0.1+1.15*{{{lines|2}}}}}em; padding:0px;"><div style="height:{{#expr:0.1+1.15*{{{lines|2}}}}}em; width:{{#expr:{{{width}}}+7}}px; line-height:1.15em; text-align:center; padding:2px 3px 1px 3px; overflow-y:auto; margin:0px; border:none; border-width:0px;">{{ | ||
#if:{{{label}}}|'''{{{label}}}: '''}}{{{caption}}}</div> | #if:{{{label}}}|'''{{{label}}}: '''}}{{{caption}}}</div> |
Latest revision as of 15:56, 14 March 2016
Note: Called by the Lead template, which guarantees that "caption", "label" parameters are always present (although possibly empty), and "width" and "height" are actually filled with values. If called otherwise (not by Lead template), "width" and "height" must be given values, else the html table structure will break.