Welcome to our new Skyland! Article rewrites are welcome. If you see any missing images, please feel free to add them. Please use the Aboutfile template when uploading and add categories.
We are also aware of some articles being unavailable. Please bear with us while we are working to get them fixed.

Template:Overlay: Difference between revisions

From Skylanders Wiki
No edit summary
Tag: sourceedit
m Troubleshooting...
Tag: sourceedit
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
<div style="position: relative;">{{{img|[[File:Spyro.jpg|200px]]}}}
<div style="position: relative;">
<div style="position: absolute; left:{{{x|0}}}px; top:{{{y|155}}}px">{{{topimg|[[File:MagicSymbolSkylanders.png|50px]]}}}</div></div><noinclude>
{{{content|[[File:Spyro.jpg|200px]]}}}
<div style="position: absolute; left:{{{x|0}}}px; top:{{{y|150}}}px">
{{{layer|[[File:MagicSymbolSkylanders.png|50px]]}}}
</div></div><noinclude>
 
==Syntax==
==Syntax==
<pre>{{imgoverlay|img=<filename>|topimg=<filename>|x=<posx>|y=<posy>}}</pre>
<pre>{{overlay|content=<content>|layer=<content>|x=<posx>|y=<posy>}}</pre>
This template is used to display images with overlays.
This template is used to display content with overlays.


===Preview code===
===Preview code===
<pre>{{imgcrop|img=[[File:Spyro.jpg|200px]]|topimg=[[File:MagicSymbolSkylanders.png|50px]]|x=0|y=155}}</pre>
<pre>{{overlay|content=[[File:Spyro.jpg|200px]]|layer=[[File:MagicSymbolSkylanders.png|50px]]|x=0|y=150}}</pre>
Resulting in an image of Spyro (resized to 200px) with an overlay of the Magic Symbol (resized to 50px) at x=0, y=155.
Resulting in an image of Spyro (resized to 200px) with an overlay of the Magic Symbol (resized to 50px) at x=0, y=150.


==Multiple layers==
==Multiple layers==
<div class="mw-customtoggle-multiple wikia-menu-button">View/Hide Section</div>
<div class="mw-customtoggle-multiple wikia-menu-button">View/Hide Section</div>
<div class="mw-collapsible mw-collapsed" id="mw-customcollapsible-multiple">
<div class="mw-collapsible mw-collapsed" id="mw-customcollapsible-multiple">
For multiple layers of images, you appropriately enough need to use multiple layers of imgoverlay templates.
For multiple layers of content, you appropriately enough need to use multiple layers of overlay templates.


===Example syntax===
===Example syntax===
Yields 3 overlays over the original picture.
Yields 3 overlays over the original content.
<pre>{{imgoverlay|img=
<pre>{{overlay|content=
  {{imgoverlay|img=
  {{overlay|content=
   {{imgoverlay|img=<filename>
   {{overlay|content=<content>
   |topimg=<filename>|x=<posx>|y=<posy>}}
   |layer=<content>|x=<posx>|y=<posy>}}
  |topimg=<filename>|x=<posx>|y=<posy>}}
  |layer=<content>|x=<posx>|y=<posy>}}
|topimg=<filename>|x=<posx>|y=<posy>}}</pre>
|layer=<content>|x=<posx>|y=<posy>}}</pre>


===Multiple layers example===
===Multiple layers example===
Doom Jet with 2 overlays: An Earth Symbol and Air Symbol. (Air is 1 layer above Earth)
Picture of Doom Jet with 2 overlays: An Earth Symbol and Air Symbol. (Air is 1 layer above Earth)
<pre>{{imgoverlay|img=
<pre>{{overlay|content=
  {{imgoverlay|img=[[File:Doom_Swap_02.png|200px]]
  {{overlay|content=[[File:Doom_Swap_02.png|200px]]
  |topimg=[[File:EarthSymbolSkylanders.png|50px]]|x=150|y=0}}
  |layer=[[File:EarthSymbolSkylanders.png|50px]]|x=150|y=0}}
|topimg=[[File:AirSymbolSkylanders.png|50px]]|x=0|y=150}}</pre>
|layer=[[File:AirSymbolSkylanders.png|50px]]|x=0|y=150}}</pre>


Result:
Result:
{{imgoverlay|img=
{{overlay|content=
  {{imgoverlay|img=[[File:Doom_Swap_02.png|200px]]
  {{overlay|content=[[File:Doom_Swap_02.png|200px]]
  |topimg=[[File:EarthSymbolSkylanders.png|50px]]|x=150|y=0}}
  |layer=[[File:EarthSymbolSkylanders.png|50px]]|x=150|y=0}}
|topimg=[[File:AirSymbolSkylanders.png|50px]]|x=0|y=150}}</div>
|layer=[[File:AirSymbolSkylanders.png|50px]]|x=0|y=150}}</div>
 
[[Category: Templates]]
</noinclude>
</noinclude>

Latest revision as of 12:35, August 9, 2016

Syntax

{{overlay|content=<content>|layer=<content>|x=<posx>|y=<posy>}}

This template is used to display content with overlays.

Preview code

{{overlay|content=[[File:Spyro.jpg|200px]]|layer=[[File:MagicSymbolSkylanders.png|50px]]|x=0|y=150}}

Resulting in an image of Spyro (resized to 200px) with an overlay of the Magic Symbol (resized to 50px) at x=0, y=150.

Multiple layers

View/Hide Section

For multiple layers of content, you appropriately enough need to use multiple layers of overlay templates.

Example syntax

Yields 3 overlays over the original content.

{{overlay|content=
 {{overlay|content=
  {{overlay|content=<content>
  |layer=<content>|x=<posx>|y=<posy>}}
 |layer=<content>|x=<posx>|y=<posy>}}
|layer=<content>|x=<posx>|y=<posy>}}

Multiple layers example

Picture of Doom Jet with 2 overlays: An Earth Symbol and Air Symbol. (Air is 1 layer above Earth)

{{overlay|content=
 {{overlay|content=[[File:Doom_Swap_02.png|200px]]
 |layer=[[File:EarthSymbolSkylanders.png|50px]]|x=150|y=0}}
|layer=[[File:AirSymbolSkylanders.png|50px]]|x=0|y=150}}

Result: