Template:Image frame: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
(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: Line 1:
<includeonly><div class="thumb tright">
<includeonly>{{#ifeq: {{{align|right}}} | center | <div class="center"> |
<div {{#if: {{{width|}}} | style="width:{{{width}}}px;" |}}>
}}<div class="thumb {{#switch: {{{align|right}}} | right=tright | left=tleft | center=tnone }}">
<div class="thumbinner" style="width:{{#expr:{{{width}}}+2}}px;">
{{{content}}}
{{{content}}}
<div class="thumbcaption">
<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></div> |}}
{{#if: {{{link|}}} | <div class="magnify" style="float:right">[[{{{link}}}|info]]</div> |}}
{{{caption}}}
{{{caption|}}}
</div>
</div>
</div>
</div>
</div></includeonly><noinclude>
</div>{{#ifeq: {{{align|right}}} | center | </div> | }}</includeonly><noinclude>
== Description ==
== Description ==
This template creates a frame like those surrounding images. This template was created mainly to put two or more images into a frame together.
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}}.


== Usage ==
== Usage ==


  <nowiki> {{imageframe | width=175 | content= [[Image:TSR1New.jpg|80px]] [[Image:TSR2New.jpg|80px]] | caption=Channel logos }} </nowiki>
  <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:
will cause:


{{Imageframe | width=175 | content= [[Image:TSR1New.jpg|80px]] [[Image:TSR2New.jpg|80px]] | caption=Channel logos }}
{{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 ==
== Parameters ==
; content : Content of the main section (generally images)
; content : (required) Content of the main section (generally images)
; caption : Content of the caption section
; 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).
; width : ''(Optional)'' Width of the DIV, in pixels
; caption : ''(optional)'' Content of the caption section.
; link : ''(Optional)'' Link for the "Enlarge" image in the caption.
; link : ''(optional)'' Link for the "Enlarge" link 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.




[[Category:Formatting templates|{{PAGENAME}}]]
[[Category:Formatting templates|{{PAGENAME}}]]
</noinclude>
</noinclude>

Revision as of 17:58, 12 March 2007

Description

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 {{superimpose}}.

Usage

 {{imageframe | width=175 | content= [[Image:TSR1New.jpg|80px]] [[Image:TSR2New.jpg|80px]] | caption=Channel logos | link=Télévision Suisse Romande | align=center}} 

will cause:

Template:Imageframe

Parameters

content
(required) Content of the main section (generally images)
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
(optional) Content of the caption section.
link
(optional) Link for the "Enlarge" link 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.