Template:Ytc-id/doc

From Angelina Jordan Wiki
Revision as of 00:19, 13 July 2024 by Dcljr (talk | contribs) (heh…)
This is a subpage documenting Template:Ytc-id. To change the template, edit that page; to change the template's documentation (seen below), edit this one.

Documentation

This template constructs a YouTube channel identifier in any of the forms that appear in YouTube URLs. It doesn't actually generate a full valid URL nor a working link. Other templates that call this one do those things. (See especially {{ytc}}.)

The name of this template is based on the phrase "youtube channel identifier" or "youtube channel id".

Usage

  • {{ytc-id|handle}}
  • {{ytc-id|channel=|user=|c=|@=|handle=}}

Here "handle" refers to the newest way of linking to YouTube channels, using an "at" symbol (e.g., @AngelinaJordanOfficial). When specifying the handle as the first positional parameter or as the value of the named parameter handle, the @ symbol must be included. But if you use the @ named parameter, you can omit the @ symbol.

If any of channel, c, user, or @ (checked in that order) are specified, the template will provide the necessary text in front of those values in the identifier (e.g., channel= in the case of the channel parameter, or the @ symbol in the case of the @ parameter). If none of these have a true value, then handle and finally the first positional parameter are checked. (Note that at is provided as an alternate name of the @ parameter, but any value assigned to @ — including an empty one — will override or "hide" the value of at.)

Examples

  • {{ytc-id|@AngelinaJordanOfficial}} ⇒ @AngelinaJordanOfficial
  • {{ytc-id|handle=@AngelinaJordanOfficial}}
  • {{ytc-id|@=AngelinaJordanOfficial}} ⇒ @AngelinaJordanOfficial
  • {{ytc-id|channel=UC1Pwa4nFvIPbtYVLcBGDpjA}} ⇒ channel/UC1Pwa4nFvIPbtYVLcBGDpjA
  • {{ytc-id|c=AngelinaJordanOfficial}} ⇒ c/AngelinaJordanOfficial
  • {{ytc-id|channel=UC1Pwa4nFvIPbtYVLcBGDpjA|c=AngelinaJordanOfficial}} ⇒ channel/UC1Pwa4nFvIPbtYVLcBGDpjA
  • {{ytc-id|channel=|c=JonathanSugarfootMoffett|user=}} ⇒ c/JonathanSugarfootMoffett
  • {{ytc-id|channel=|c=|user=iv4nl1v3z}} ⇒ user/iv4nl1v3z

In the last three examples, notice how the value of channel overrides that of c (and c would override user, and so on, as explained above), but empty values of named parameters don't override the values of other named parameters (except that an empty @ will override its alias at).

See also

  • {{ytc}} and the other YouTube-related templates listed there