Template:Image frame: Difference between revisions

update to make sure the frame appears; note that the way the divs are set up, "width" actually is required; the "magnify" link can't be an image with CSS hacks; add an "align" parameter
(updating category)
(update to make sure the frame appears; note that the way the divs are set up, "width" actually is required; the "magnify" link can't be an image with CSS hacks; add an "align" parameter)
Line 1:
<includeonly>{{#ifeq: {{{align|right}}} | center | <div class="thumb trightcenter"> |
}}<div class="thumb {{#ifswitch: {{{widthalign|right}}} | styleright="width:{{{width}}}px;"tright | left=tleft | center=tnone }}">
<div class="thumbinner" style="width:{{#expr:{{{width}}}+2}}px;">
{{{content}}}
<div class="thumbcaption">
{{#if: {{{link|}}} | <div class="magnify" style="float:right"><a href="/wiki/[[{{{link}}}" class="internal" title="Enlarge"><img src="/skins-1.5/common/images/magnify-clip.png" width="15" height="11" alt="Enlarge" /></a>|info]]</div> |}}
{{{caption|}}}
</div>
</div>
</div>{{#ifeq: {{{align|right}}} | center | </div> | }}</includeonly><noinclude>
== Description ==
This template creates a frame like those surrounding images. This template wascan createdbe mainlyused to put two or more images into a frame together, or as a wrapper for more complicated templates like {{tl|superimpose}}.
 
== Usage ==
 
<nowiki> {{imageframe | width=175 | content= [[Image:TSR1New.jpg|80px]] [[Image:TSR2New.jpg|80px]] | caption=Channel logos | link=Télévision Suisse Romande | align=center}} </nowiki>
 
will cause:
 
{{Imageframe | width=175 | content= [[Image:TSR1New.jpg|80px]] [[Image:TSR2New.jpg|80px]] | caption=Channel logos | link=Télévision Suisse Romande | align=center}}
<br clear="all">
 
Note, do not add "px" to the width: ie, use width=175 and not width=175px.
== Parameters ==
; content : (required) Content of the main section (generally images)
Note; width : (required) The width of the image within the frame, in pixels (though do not add "px" to the width: ie, use width=175 and not width=175px).
; caption : Content of the caption section
; widthcaption : ''(Optionaloptional)'' WidthContent of the DIV,caption in pixelssection.
; link : ''(Optionaloptional)'' Link for the "Enlarge" imagelink in the caption. (in the future, may also be used as the link for the image field inside the frame, though it would probably require an additional ''height'' parameter)
; align : (''optional'', defaults to right) Valid values: right, left, center.
 
 
Anonymous user