Anonymous user
Template:Image frame: Difference between revisions
making width default to 200px broke pages that deliberately didn't specify a width in order to make the frame scale according to its content; fixing with parserfunctions
(Add pos parameter so other objects such as trees can use Template:Imageframe) |
(making width default to 200px broke pages that deliberately didn't specify a width in order to make the frame scale according to its content; fixing with parserfunctions) |
||
Line 1:
<includeonly>{{#ifeq:{{{align|right}}}|center|<div class="center">|}}
<div class="thumb {{#switch: {{{align|right}}} | right=tright | left=tleft | center=tnone | none=tnone |
tright}}"><div class="thumbinner" style="{{#if:{{{width|}}}|width:{{#expr:{{{width
{{#ifeq: {{{pos|bottom}}} | bottom |<div class="thumbimage" style="
<div class="thumbcaption">{{#if: {{{link|}}} | <div class="magnify" style="float:right">{{{linkoverride|[[{{{link}}}|info]]}}}</div> |}}
{{{caption|}}}</div>
{{#ifeq: {{{pos|bottom}}} | top | <div class="thumbimage" style="
{{#ifeq:{{{align|right}}}|center|</div>|}}</includeonly><noinclude>
This template creates a frame like those surrounding images. This template can be used to put two or more images into a frame together, or as a wrapper for more complicated templates like {{tl|superimpose}}. Sample code for using this template is presented below.
|