Template:Soundcloud/doc: Difference between revisions

From Tardis Wiki, the free Doctor Who reference
(Created page with "'''{{tlx|{{PAGENAME}}}}''' creates [https://soundcloud.com SoundCloud] embeds on articles. To use, just type: {{tlx|soundcloud|url}} For example, {{tlx|soundcloud|https://s...")
Tag: sourceedit
 
(Updating documentation with new features)
Tag: sourceedit
Line 1: Line 1:
'''{{tlx|{{PAGENAME}}}}''' creates [https://soundcloud.com SoundCloud] embeds on articles. To use, just type:  
The '''{{tlx|Soundcloud}}''' template creates [https://soundcloud.com SoundCloud] embeds on articles. There are two ways to use it. The first creates an embed that will take up the full width of the article:


{{tlx|soundcloud|url}}
{{tlx|soundcloud|url}}


For example, {{tlx|soundcloud|https://soundcloud.com/big-finish/doctor-who-doom-coalition-2-trailer}} creates:
For example, {{tlx|soundcloud|https://soundcloud.com/big-finish/doctor-who-urgent-calls}} creates:


{{soundcloud|https://soundcloud.com/big-finish/doctor-who-doom-coalition-2-trailer}}
{{soundcloud|https://soundcloud.com/big-finish/doctor-who-urgent-calls}}


There is also an optional width parameter. {{tlx|soundcloud|width{{=}}100%|https://soundcloud.com/big-finish/doctor-who-doom-coalition-2-trailer}} gives:
This respects infoboxes and will display side by side instead of being pushed beneath. There is also an optional width parameter. {{tlx|soundcloud|width{{=}}50%|https://soundcloud.com/big-finish/doctor-who-urgent-calls}} gives:


{{soundcloud|https://soundcloud.com/big-finish/doctor-who-doom-coalition-2-trailer|width=100%}}
{{soundcloud|https://soundcloud.com/big-finish/doctor-who-urgent-calls|width=50%}}
 
The second way creates a small embed to the side, in the same place an image would go. Just add an "i" as the second parameter.<ref>Technically, anything could go in place of the "i".</ref> By default, the player will snap to the right. To display it on the left, add <tt>left=1</tt>. To add a caption, add <tt>caption=whatever</tt>. Captions are particularly important because the smaller player size truncates the track title.
 
{{soundcloud|https://soundcloud.com/big-finish/doctor-who-urgent-calls|i|caption=This is an example.}}
{{tlx|soundcloud|https://soundcloud.com/big-finish/doctor-who-urgent-calls{{nbsp}}|i|caption{{=}}This is an example.}} is demonstrated to the right.
 
{{reflist}}


<noinclude>[[category:template documentation|{{PAGENAME}}]]</noinclude>
<noinclude>[[category:template documentation|{{PAGENAME}}]]</noinclude>

Revision as of 03:18, 21 July 2016

The {{Soundcloud}} template creates SoundCloud embeds on articles. There are two ways to use it. The first creates an embed that will take up the full width of the article:

{{soundcloud|url}}

For example, {{soundcloud|https://soundcloud.com/big-finish/doctor-who-urgent-calls}} creates:

This respects infoboxes and will display side by side instead of being pushed beneath. There is also an optional width parameter. {{soundcloud|width=50%|https://soundcloud.com/big-finish/doctor-who-urgent-calls}} gives:

The second way creates a small embed to the side, in the same place an image would go. Just add an "i" as the second parameter.[1] By default, the player will snap to the right. To display it on the left, add left=1. To add a caption, add caption=whatever. Captions are particularly important because the smaller player size truncates the track title.

EmbedVideo was given an illegal value for the alignment parameter "i". Valid values are "left", "center", or "right".

{{soundcloud|https://soundcloud.com/big-finish/doctor-who-urgent-calls |i|caption=This is an example.}} is demonstrated to the right.


  1. Technically, anything could go in place of the "i".