Template:Ytv-data

From Angelina Jordan Wiki

Documentation

This template contains data on YouTube videos (upload dates, titles, and lengths) that can be used in various ways by other templates. By default the template outputs table cells (and in this configuration, it is not intended to be called directly in articles), but other kinds of output are possible if the template is called in different ways (assuming the appropriate templates exist, as explained below).

Usage

  • {{ytv-data|ID}}
  • {{ytv-data|ID|suffix}}

ID is the ID number for the YouTube video (see example below). Currently the only supported suffixes are TL or p (and the latter isn't really in use). These cause the template to call {{ytv-dTL}} or {{ytv-dp}}, respectively, to format the output in different ways. See the documentation for those templates for details. With no suffix specified, {{ytv-d}} is used, which formats the information in table cells.

In general, the output will be formatted using the template {{ytv-dX}} if this template is called as {{ytv-data|ID|X}} (for any X). (To make this work, only the template {{ytv-dX}} need be created; no change to this template is necessary to get new output options.)

If this seems confusing, think of it this way: {{ytv-data}} serves as both a "database" of information (the actual template page itself) and a way of "querying" that database for the information held within (using calls of the form shown above). Templates like {{ytv-d}} and {{ytv-dTL}} specify the "format" in which the information is displayed. Finally, a template like {{ytv-data-table-row}} (which doesn't actually exist yet) would provide a very "high-level" way of requesting the information (i.e., "give me information about this, and spare me the details of how you're doing it"). As an editor, if you want to correct existing information or add missing information, you should edit Template:Ytv-data. If you want to make minor changes to how the information is presented, you should edit Template:Ytv-d (or whatever similarly named existing template). But if you want to make major changes to how the information is presented, you should create totally new templates, as previously explained.

Note that the same situation exists for {{ytv-stats}} & {{ytv-s}} (which contain and process statistics such as number of views, likes, dislikes, and comments), and {{ytv-info}} & {{ytv-i}} (for when and where the videos were recorded, how old Angelina was at the time, and several other things) — although the latter "info" templates are more "under development" than actually "in service".

Examples

  • <table class="wikitable"><tr>{{ytv-data|nwFloCPXzCs}}</tr></table>
2016-09-27
Angelina Jordan - I Put A Spell On You
3:49
  • {{ytv-data|nwFloCPXzCs|p}}

The awkwardness of the first example suggests why the template is not intended to be used "as is" in articles. (The reason that was chosen as the default behavior is because "video tables" were envisioned as the most common way the data would be presented. This might change in the future…)

Coverage

Currently, the template contains data for all the videos uploaded to the Angelina Jordan Official channel up through 2021-01, but not those uploaded to the Angelina Jordan CoverChannel and Angelina Jordan Fanclub Mosarz, nor to TV 2, NRK, etc.