Template:Eras
- This documentation is imported from Template:Eras/doc
This template generates the "eras" tab bar shown at the top of "Topic in Game" articles (e.g. Weapons in GTA San Andreas, Vehicles in GTA III) — a row of per-game icon tabs letting readers jump between that same topic's article in every other GTA game, plus "2D Universe"/"3D Universe"/"HD Universe" summary tabs when a matching page exists for that universe.
Usage
Place it at the very top of an article whose title follows the "Topic in Game" (or "... Era") naming convention:
{{Eras}}
There is one optional parameter (unnamed, {{{1}}}): the full page title to build the tab bar for. If omitted, it defaults to Eras — which is why {{Eras}} is normally used with no parameter at all, directly on the page it describes.
{{Eras|Weapons in GTA San Andreas}}
Passing an explicit title lets you preview or embed another page's era bar without being on that page — as done in the examples below.
What it does
- It only renders anything if the given title contains " in " — so {{Eras}} silently does nothing if used on a page whose name doesn't follow the convention.
- It shows one tab per game for which a "Topic in Game" page actually exists (the internal helper {{Eras/link}} checks page existence before rendering a tab), plus a link back to the base topic page (e.g. Weapons).
- If the current page is one of the tab targets, that tab is shown highlighted/active instead of as a link.
- GTA III and GTA IV each get a second tab pointing at their dedicated "... Era" article (e.g. Vice City in GTA III Era), in addition to the regular game tab.
- "2D Universe", "3D Universe" and "HD Universe" tabs are only shown if a "Topic in [that universe]" page exists.
- In the main namespace, placing {{Eras}} also auto-categorizes the page: a page titled "Weapons in GTA San Andreas" is added to Category:Weapons and Category:GTA San Andreas (and to a same-named category, if one exists).
Examples
Placed on Weapons in GTA San Andreas (previewed here by passing the title explicitly):
{{Eras|Weapons in GTA San Andreas}}
Placed on Vehicles in GTA III:
{{Eras|Vehicles in GTA III}}
On a page whose title doesn't contain " in ", {{Eras}} renders nothing at all:
{{Eras|Some Unrelated Page}}
Related
- {{Eras/title}} and {{Eras/link}} are internal helper templates used by this template, and aren't meant to be transcluded directly.
- {{GameTemplateList}} is used on other templates' documentation pages to demo text output across every game code; {{Eras}} instead demos itself directly above, since it's a navigation widget rather than a simple text-conversion template.