Template:Frame: Difference between revisions

From 118Wiki
Jump to navigation Jump to search
(adding caption option)
(added link option)
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{|
<includeonly>{|align=center style="max-width:{{#if: {{{2|}}}|{{{2|}}}|200px}};{{#if: {{{FLOAT|}}}|float:{{{FLOAT|}}}|}}"
|
|align=center|
{|class=wood width="{{#if: {{{2|}}}|{{{2|}}}|200px}}"
{|class=wood
![[File:{{{1}}}|{{#if: {{{2|}}}|{{{2|}}}|200px}}]]
![[File:{{{1}}}|{{#if: {{{2|}}}|{{{2|}}}|200px}}|link={{#if: {{{link|}}}|{{{link|}}}|File:{{{1}}}}}]]
|}{{#if: {{{CAPTION|}}}|<center><small>{{{CAPTION|}}}</small></center>|}}
|}{{#if: {{{CAPTION|}}}|<small>{{{CAPTION|}}}</small>|}}
|}</includeonly>
|}</includeonly>
<noinclude>Creates a picture frame for an image. If no width specified, will display at 200px wide.
<noinclude>Creates a picture frame for an image. If no width specified, will display at 200px wide.
Line 18: Line 18:


{{Frame|GarudaCrew2391.png|500px}}
{{Frame|GarudaCrew2391.png|500px}}
===Optional link===
<pre>{{Frame|Rahman.jpg|link=Rahman, Roshanara}}</pre>
{{Frame|Rahman.jpg|link=Rahman, Roshanara}}


===Adding a Caption===
===Adding a Caption===
To add a caption, just add a CAPTION= variable.
To add a caption, just add a CAPTION= variable.


<pre>{{Frame|GarudaCrew2391.png|500px|CAPTION=Inaugural Senior Staff of the USS Garuda}}</pre>
<pre style="white-space:pre-wrap">{{Frame|GarudaCrew2391.png|500px|CAPTION=Inaugural Senior Staff of the USS Garuda}}</pre>


{{Frame|GarudaCrew2391.png|500px|CAPTION=Inaugural Senior Staff of the USS Garuda}}
{{Frame|GarudaCrew2391.png|500px|CAPTION=Inaugural Senior Staff of the USS Garuda}}
You can use wiki code and other templates within the caption.
<pre style="white-space:pre-wrap">{{Frame|GarudaCrew2391.png|500px|CAPTION='''Inaugural Senior Staff of the {{USS|Garuda}}'''}}</pre>
{{Frame|GarudaCrew2391.png|500px|CAPTION='''Inaugural Senior Staff of the {{USS|Garuda}}'''}}
And of course, the width itself is still optional and the image will be displayed at 200px if no width is specified.
<pre style="white-space:pre-wrap">{{Frame|GarudaCrew2391.png|CAPTION=Inaugural Senior Staff of the {{USS|Garuda}}}}</pre>
{{Frame|GarudaCrew2391.png|CAPTION=Inaugural Senior Staff of the {{USS|Garuda}}}}
===Floating the frame so that text goes to the left or right of it===
{{Frame|Rahman.jpg|FLOAT=right}}
By default, the frame will be centered and any text after it will appear below it. But what if you want the framed picture to be to the right or left of the text in your page? Just add a FLOAT= variable with left or right specified.
<pre>{{Frame|Rahman.jpg|FLOAT=right}}</pre>
You can see how now the image is to the right of this text rather than above it.
===Questions/Comments/Suggestions===
Send a message. [[User:Rich|'''♫ Rich''']] ▪ [[User talk:Rich|<small>talk</small>]]


[[Category:Templates]]</noinclude>
[[Category:Templates]]</noinclude>

Latest revision as of 03:09, 29 March 2015

Creates a picture frame for an image. If no width specified, will display at 200px wide.

{{Frame|NAME OF FILE|OPTIONAL WIDTH}}

No width specified

{{Frame|GarudaCrew2391.png}}
GarudaCrew2391.png


Optional width specified

{{Frame|GarudaCrew2391.png|500px}}
GarudaCrew2391.png


Optional link

{{Frame|Rahman.jpg|link=Rahman, Roshanara}}
Rahman.jpg


Adding a Caption

To add a caption, just add a CAPTION= variable.

{{Frame|GarudaCrew2391.png|500px|CAPTION=Inaugural Senior Staff of the USS Garuda}}
GarudaCrew2391.png
Inaugural Senior Staff of the USS Garuda


You can use wiki code and other templates within the caption.

{{Frame|GarudaCrew2391.png|500px|CAPTION='''Inaugural Senior Staff of the {{USS|Garuda}}'''}}
GarudaCrew2391.png
Inaugural Senior Staff of the USS Garuda


And of course, the width itself is still optional and the image will be displayed at 200px if no width is specified.

{{Frame|GarudaCrew2391.png|CAPTION=Inaugural Senior Staff of the {{USS|Garuda}}}}
GarudaCrew2391.png
Inaugural Senior Staff of the USS Garuda


Floating the frame so that text goes to the left or right of it

Rahman.jpg

By default, the frame will be centered and any text after it will appear below it. But what if you want the framed picture to be to the right or left of the text in your page? Just add a FLOAT= variable with left or right specified.

{{Frame|Rahman.jpg|FLOAT=right}}

You can see how now the image is to the right of this text rather than above it.

Questions/Comments/Suggestions

Send a message. ♫ Richtalk