Template:Media table: Difference between revisions

From the Super Mario Wiki, the Mario encyclopedia
Jump to navigationJump to search
(up to four files can be grouped here)
 
mNo edit summary
 
(168 intermediate revisions by 17 users not shown)
Line 1: Line 1:
:{| width="80%" style="border:1px solid black;"
<includeonly>{{#forargs:file|key|value|{{media table/row|type={{{type{{#var:key}}|{{#switch:{{lc:{{#sub:{{#var:value}}|-4}}}}|.ogv|.mp4|.mpg|mpeg|webm=video}}}}}|file={{#var:value}}|title={{{title{{#var:key}}|}}}|description={{{description{{#var:key}}|}}}|length={{{length{{#var:key}}|}}}}}}}
|- style="background:#F0F0F0;"
:<small>[[Help:Media]] • [[wikipedia:Help:Media (audio and video)|Having trouble playing?]]</small></includeonly><noinclude>
! align="left" width="1%"| Media
{{media table
! align="left" width="20%"|{{{type1}}}
|file1=Example.ogv
! align="left" width="20%"|{{{type2}}}
|title1=Example video
! align="left" width="20%"|{{{type3}}}
|description1=Showing an example video file.
! align="left" width="20%"|{{{type4}}}
|length1=0:12
|-
|file2=Example.oga
|rowspan="1" style="background:#F0F0F0;" | [[Image:Soundcheck.png|65px]]
|title2=Example audio
|{{{link1}}}<br>
|description2=Showing an example audio file.
{{{description1}}}<br>
|length2=0:03
<small>{{{file1}}}</small>
}}
|{{{link2}}}<br>
 
{{{description2}}}<br>
== Usage ==
<small>{{{file2}}}</small>
This template is used for organizing media files on pages. The table above is produced by the following syntax:
|{{{link3}}}<br>
 
{{{description3}}}<br>
<pre>
<small>{{{file3}}}</small>
{{media table
|{{{link4}}}<br>
|file1=Example.ogv
{{{description4}}}<br>
|title1=Example video
<small>{{{file4}}}</small>
|description1=Showing an example video file.
|}
|length1=0:12
|file2=Example.oga
|title2=Example audio
|description2=Showing an example audio file.
|length2=0:03
}}
</pre>
 
=== Parameters ===
The following parameters may be defined when using the template (replace <code>X</code> with a number):
 
*<code>fileX</code> - The filename, excluding the "File:" prefix. So for the file at "File:Example.oga", this parameter would be defined as "Example.oga".
*<code>titleX</code> - The title of the file that will be used in the table; automatically appears in bold.
*<code>descriptionX</code> - A short description of the file that will appear after the title.
*<code>lengthX</code> - The file duration, in M:SS format.
 
Note that for all the values, additional files can be added to the list by incrementing the parameter number.
 
== Sub-template ==
*[[Template:Media table/row]]
 
[[Category:Media templates]]</noinclude>

Latest revision as of 11:50, January 22, 2024

Video.svg Example video - Showing an example video file.
File infoMedia:Example.ogv
0:12
Audio.svg Example audio - Showing an example audio file.
File infoMedia:Example.oga
0:03
Help:MediaHaving trouble playing?

Usage

This template is used for organizing media files on pages. The table above is produced by the following syntax:

{{media table
|file1=Example.ogv
|title1=Example video
|description1=Showing an example video file.
|length1=0:12
|file2=Example.oga
|title2=Example audio
|description2=Showing an example audio file.
|length2=0:03
}}

Parameters

The following parameters may be defined when using the template (replace X with a number):

  • fileX - The filename, excluding the "File:" prefix. So for the file at "File:Example.oga", this parameter would be defined as "Example.oga".
  • titleX - The title of the file that will be used in the table; automatically appears in bold.
  • descriptionX - A short description of the file that will appear after the title.
  • lengthX - The file duration, in M:SS format.

Note that for all the values, additional files can be added to the list by incrementing the parameter number.

Sub-template