Template:Ytv

From Angelina Jordan Wiki

YouTube video

Documentation

This template forms external links to YouTube videos. Other templates exist for linking to playlists, channels, etc.

The name of the template is based on the phrase "youtube video".

This template is used on a great many pages. Making any changes to it will cause lots of jobs to be added to the processing queue.

Usage

  • {{ytv|video id|text to be linked}}
  • {{ytv|video id|text to be linked|t=timepoint}}
  • {{ytv|video id|t=timepoint|text to be linked}}
  • {{ytv|video id|text to be linked|thumb=alignment}}
  • {{ytv|v=video id|t=timepoint|linktext=text to be linked|thumb=alignment}}
  • {{ytv|v= |t= |linktext= |thumb= |channel-name= |accessed=}}

These are the most common patterns. Other combinations of parameters are possible. Note that the second and third forms are completely equivalent; the second form looks better, but the third might be easier to use if working with a copied URL (since the "t=" timecode part of the URL immediately follows the "v=" video ID part). If present, the value of t must be in a form recognized by YouTube, such as 105s or 1m45s.

The text to be linked (or the value of linktext) is usually the title of the video, but need not be. For convenience, the shorter name text can be used in place of linktext.

If present, thumb must be set to etiher left or right, as it is used to float a thumbnail image either to the left or to the right of the text. (Of course, there must be a thumbnail image with the proper name already uploaded to this wiki for this to work properly, otherwise a broken link will be shown. The template makes no attempt to determine if an image is present. The title of the image must be the letters "YT" followed by the video ID.)

Use of the accessed parameter triggers "citation" formatting, where "YouTube" or "channel-name on YouTube" is given as the source and the value of accessed is used as the last-accessed date. See the examples below.

For convience, the shorter name cn can be used in place of channel-name.

Examples

Errors

These are equivalent in terms of the link target they use, which is YouTube's homepage — but if you wanted to link to that, you should have used {{ytl}}:

See also

Full list of similar templates (including this one in bold):    [edit this list]

  • {{ytc}} – link to a YouTube channel (including specific tabs, like "About" or "Videos")
  • {{ytp}} – link to a YouTube playlist
  • {{yts}} – link to YouTube search results
  • {{ytv}} – link to a YouTube video

These templates are all "special cases" of the more general template (which they all call):

  • {{ytl}} – link to any page at YouTube

And that template in turn calls {{YTURL}} and {{xl}} to form the link itself.