Difference between revisions of "Template:Image"

From SC4D Encyclopaedia
Jump to navigation Jump to search
sc4e>JoeST
m (→‎Example: test)
m (37 revisions imported)
 
(154 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<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}}
{{img
+
</noinclude>
| 1 =
 
| page =
 
| url =
 
| width =
 
}}
 
*'''1''': The external image URL
 
*'''''page''''': An article name
 
*'''''url''''': An external URL to link to
 
*'''''width''''': can take these values
 
**1 (default): maximum width of image is 800px
 
**2: maximum width is 500px
 
**3: maximum width is 300px
 
==Example==
 
</noinclude><span class="plainlinks" id="{{{{FULLPAGENAME}}/id|{{{width|}}}}}">{{#if:{{{page|}}}{{{url|}}}|<!-- page or url parameters set
 
  
-->{{#if:{{{page|}}}|<!--
+
<!-- For reference, {{{1}}} is the image's path.-->
      page parameter set -->[{{fullurl:{{{page}}}}} {{{1}}}]|<!--
+
 
      url parameter set  -->[{{{url}}} {{{1}}}]}}<!--
+
<div class="plainlinks" {{#if:{{{width|}}}|class="{{{width}}}"}}>
      neither set       -->|{{{1}}}}}</span><noinclude>
+
 
*Where neither is set:
+
{{#if:
{{img|http://www.sc4devotion.com/img/SC4DVD_1.jpg}}
+
    {{{page|}}}{{{url|}}}|
*Where page is set:
+
<!-- page or url parameters set -->
{{img|http://www.sc4devotion.com/img/SC4DVD_1.jpg|page=Main_Page}}
+
    {{#if:{{{page|}}}|
*Where url is set:
+
        <!-- page parameter set -->  
{{img|http://www.sc4devotion.com/img/SC4DVD_1.jpg|url=http://www.google.com/}}
+
            [{{fullurl:{{{page}}}}} {{{1}}}]|
*Where width is set:
+
        <!-- url parameter set  -->
{{img|http://www.sc4devotion.com/img/SC4DVD_1.jpg|width=2}}
+
            [{{{url}}} {{{1}}}]}}
 +
<!-- neither set -->
 +
    |{{{1}}} }}
 +
</div>
 +
 
 +
<noinclude>
 +
{{documentation}}
 +
</noinclude>

Latest revision as of 15:20, 7 August 2019




[create] Documentation icon Template documentation