Wikia

My Little Pony Friendship Is Magic Wiki

Nameconvert

Talk0
1,184pages on
this wiki

Template page

[edit] [purge] Template-info.png Template documentation

This template returns the official name of an episode, if given its season and episode numbers or overall number; or the season and episode number ("SXEY"), zero-padded and truncated as specified, if given the official name; or the overall episode number, given the season and episode or the name. Other combinations can be achieved through nested uses.

Syntax

{{Nameconvert|1|2|pad=|r=}}

If you want to get an episode number:

  • There is one unnamed parameter, which is the episode name. Must be exactly the same as listed on episodes.

If you want to get an episode name:

  • Use two unnamed parameters: the first is the episode's season number, and the the second is the episode's number in that season. Zero-padding is irelevant.
  • Or you can use one unnamed parameter, which is the episode's overall number.

In either case:

  • "pad" (optional) is the amount of zero-padding you want. pad=0 will produce no padding, pad=1 will pad only the episode number, and pad=2 will pad both the season and episode numbers. Won't do anything if you're getting an episode name, obviously. Defaults to pad=2.
  • "r" (short for "return") (optional) is how much you want to be returned (only applies when inputting an episode name). Possible values are s, sn, e, en, oa — for, respectively, season (S01), season number (01), episode (E01), episode number (01), overall number (55). Default is full return (S01E01). Pad is still applied when using this. Let me know if you need more options.

Examples

  • {{nameconvert|1|2}} -> Friendship is Magic, part 2
  • {{nameconvert|Baby Cakes}} -> S02E13
  • {{nameconvert|Look Before You Sleep|pad=0}} -> S1E8
  • {{nameconvert|Magic Duel|r=e}} -> E05
  • [[{{nameconvert|2|26}}]] -> A Canterlot Wedding - Part 2
  • [[{{nameconvert|3|1}}|The Crystal Empire]] -> The Crystal Empire
  • [[{{nameconvert|1|1}}/Gallery#Prologue|introduction]] -> introduction
  • {{nameconvert|{{nameconvert|1|25}}}} -> S01E25
  • {{nameconvert|Magic Duel|r=oa}} -> 57
  • {{nameconvert|{{nameconvert|46}}|pad=0}} -> S2E20

Notes

To update this template:

  1. Go to Template:Nameconvert/list and add the episode to the appropriate place in each of the two sections.
  2. Make sure {{eps}} is updated, as this template makes use of it.

All values (strings and integers) should follow what is listed on episodes - capitalization, punctuation, and going in airing order rather than production order.

Please contact User:Bobogoobo with any questions or suggestions regarding this template.

Subpages

Nameconvert/docNameconvert/helperNameconvert/list

Around Wikia's network

Random Wiki