Template:Media table: Difference between revisions
From the Super Mario Wiki, the Mario encyclopedia
Jump to navigationJump to search
No edit summary |
No edit summary |
||
Line 10: | Line 10: | ||
|title2=Example Audio | |title2=Example Audio | ||
|description2=Showing an example. | |description2=Showing an example. | ||
|length2=0: | |length2=0:03 | ||
}} | }} | ||
==Usage== | == Usage == | ||
The | The table above is produced by the following syntax: | ||
<pre><nowiki>{{media table | <pre><nowiki>{{media table | ||
|type1=video | |type1=video | ||
Line 25: | Line 25: | ||
|title2=Example Audio | |title2=Example Audio | ||
|description2=Showing an example. | |description2=Showing an example. | ||
|length2=0: | |length2=0:03 | ||
}}</nowiki></pre> | }}</nowiki></pre> | ||
=== Parameters === | |||
The purpose of this template is to cleanly insert audio and video files into pages. The following parameters may be defined when using it. Replace <code>X</code> with a number. | The purpose of this template is to cleanly insert audio and video files into pages. The following parameters may be defined when using it. Replace <code>X</code> with a number. | ||
*<code>typeX</code> - Can be set to either "audio" or "video". This parameter controls the icon displayed next to the file and how to handle the | *<code>typeX</code> - Can be set to either "audio" or "video". This parameter controls the icon displayed next to the file and how to handle the media link. | ||
*<code>fileX</code> - The filename | *<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> - | *<code>titleX</code> - A title for the file as it will appear on the page. | ||
*<code>descriptionX</code> - A short description of the file that will appear | *<code>descriptionX</code> - A short description of the file that will appear next to the title. | ||
*<code>lengthX</code> - | *<code>lengthX</code> - M:SS format. | ||
Note that for all the values, additional files can be added to the list by incrementing the number in the parameter. | Note that for all the values, additional files can be added to the list by incrementing the number in the parameter. | ||
==Code documentation== | == Code documentation == | ||
Calls {{tem|media table/OGA}} for audio files and {{tem|media table/OGV}} for video files with a [[mww:Help:Extension:ParserFunctions##switch|switch]] statement. | Calls {{tem|media table/OGA}} for audio files and {{tem|media table/OGV}} for video files with a [[mww:Help:Extension:ParserFunctions##switch|switch]] statement. | ||
[[Category:Media templates]]</noinclude> | [[Category:Media templates]]</noinclude> |
Revision as of 23:51, May 12, 2021
Template:Media table/OGVTemplate:Media table/OGA
Usage
The table above is produced by the following syntax:
{{media table |type1=video |file1=Example.ogv |title1=Example Video |description1=Showing an example. |length1=0:12 |type2=audio |file2=Example.oga |title2=Example Audio |description2=Showing an example. |length2=0:03 }}
Parameters
The purpose of this template is to cleanly insert audio and video files into pages. The following parameters may be defined when using it. Replace X
with a number.
typeX
- Can be set to either "audio" or "video". This parameter controls the icon displayed next to the file and how to handle the media link.fileX
- The filename, excluding the "File:" prefix. So for the file at "File:Example.oga", this parameter would be defined as "Example.oga".titleX
- A title for the file as it will appear on the page.descriptionX
- A short description of the file that will appear next to the title.lengthX
- M:SS format.
Note that for all the values, additional files can be added to the list by incrementing the number in the parameter.
Code documentation
Calls {{media table/OGA}} for audio files and {{media table/OGV}} for video files with a switch statement.