Difference between revisions of "Template:Tile"

From AYSO Wiki
(add support for external links)
Line 1: Line 1:
 
<includeonly><div class="tile d-inline-block">
 
<includeonly><div class="tile d-inline-block">
 
<div class="tile-icon" {{#if:{{{image|}}}|data-background="{{#ifeq:{{{image|}}}|default|/w/extensions/MyWikisLocalConfig/favicon/apple-touch-icon.png|{{filepath:{{PAGENAME:{{{image|}}}}}}}}}"}}></div><!--
 
<div class="tile-icon" {{#if:{{{image|}}}|data-background="{{#ifeq:{{{image|}}}|default|/w/extensions/MyWikisLocalConfig/favicon/apple-touch-icon.png|{{filepath:{{PAGENAME:{{{image|}}}}}}}}}"}}></div><!--
--><div class="tile-caption">{{#if:{{{target|}}}
+
--><div class="tile-caption">{{#if:{{{target|}}} or {{{external_target|}}}
   |[[{{{target|}}}|{{{title|}}}]]
+
   |{{#if:{{{external_target|}}}|[{{{external_target}}} {{{title|}}}]|[[{{{target|}}}|{{{title|}}}]]}}
 
   |{{{title|}}}
 
   |{{{title|}}}
 
}}</div></div></includeonly><noinclude>
 
}}</div></div></includeonly><noinclude>
Line 36: Line 36:
 
|image=Icon money.png
 
|image=Icon money.png
 
}}
 
}}
{{Tile
+
<!--{{Tile
 
|title=Division Coordinator
 
|title=Division Coordinator
 
|target=Division Coordinator
 
|target=Division Coordinator
 
|image=Icon soccer.png
 
|image=Icon soccer.png
 +
}}-->
 +
{{Tile
 +
|title=AYSO Website
 +
|external_target=https://ayso.org
 +
|image=Icon referee.png
 
}}
 
}}
 
}}
 
}}

Revision as of 00:18, 11 May 2022

Usage
{{Tile
|title=
|target=
|image=
}}
Example

(Wrapped into Template:Tiles)

Creates a tile.

Template parameters

ParameterDescriptionTypeStatus
Tile titletitle

Tile text.

Stringoptional
Link targettarget

Name of the page to link the tile to.

Pageoptional
Imageimage

Name of the uploaded image to be shown as the tile icon.

Fileoptional