Difference between revisions of "Template:Image"

From SC4D Encyclopaedia
Jump to navigation Jump to search
sc4e>Jdenm8
m (Reverted edits by Jdenm8 (Talk) to last version by CasperVg)
m (37 revisions imported)
 
(14 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<noinclude>{{pp-template}}</noinclude><noinclude>This template includes an external image, and can also link you to either the external image, an internal article or an external link.
+
<noinclude>
==Syntax==
+
{{pp-template}}
<nowiki>{{img
+
</noinclude>
| 1
 
| page
 
| url
 
| width
 
}}</nowiki>
 
*'''1''': The external image URL
 
*'''''page''''': An article name
 
*'''''url''''': An external URL to link to
 
*'''''width''''': can take these values
 
**tinyImg: upto 300px
 
**smallImg: upto 500px
 
**all others are 800px
 
  
==Example==
+
<!-- For reference, {{{1}}} is the image's path.-->
</noinclude><span class="plainlinks" {{#if:{{{width|}}}|id="{{{width}}}"}}>{{#if:{{{page|}}}{{{url|}}}|<!-- page or url parameters set
 
  
-->{{#if:{{{page|}}}|<!--
+
<div class="plainlinks" {{#if:{{{width|}}}|class="{{{width}}}"}}>
      page parameter set -->[{{fullurl:{{{page}}}}} {{{1}}}]|<!--
+
 
      url parameter set  -->[{{{url}}} {{{1}}}]}}<!--
+
{{#if:
      neither set       -->|{{{1}}}}}</span><noinclude>
+
    {{{page|}}}{{{url|}}}|
*Where neither is set:
+
<!-- page or url parameters set -->
{{img|http://www.sc4devotion.com/img/SC4DVD_1.jpg}}
+
    {{#if:{{{page|}}}|
*Where page is set (to [[Main Page]]):
+
        <!-- page parameter set -->  
{{img|http://www.sc4devotion.com/img/SC4DVD_1.jpg|page=Main_Page}}
+
            [{{fullurl:{{{page}}}}} {{{1}}}]|
*Where url is set (too google):
+
        <!-- url parameter set  -->
{{img|http://www.sc4devotion.com/img/SC4DVD_1.jpg|url=http://www.google.com/}}
+
            [{{{url}}} {{{1}}}]}}
*Where width is set (to tinyImg):
+
<!-- neither set -->
{{img|http://www.sc4devotion.com/img/SC4DVD_1.jpg|width=tinyImg}}
+
    |{{{1}}} }}
 +
</div>
 +
 
 +
<noinclude>
 +
{{documentation}}
 +
</noinclude>

Latest revision as of 15:20, 7 August 2019




[create] Documentation icon Template documentation