User:DaisyGeekyTransGirl/sandbox III/doc

This is a navbox template intended for "Year in country" articles for Asian countries. Based on the input year, it contains all countries in Asia in that year, linked to the respective "Year in country" article, if that doesn't exist the "Decade in country" article, and if that doesn't exist either the "History of country" article.

This template is based on Year in Europe and therefore uses mostly the same parameters. The template may not yet contain all former countries, though the goal is to make it accurate for all years after 1000.

Parameters

 * (first unnamed parameter): The year (required; if unspecified or not numeric an error message is given, such as on this template page )
 * : A custom title (default: " in Asia", linked if an article with that name exists)
 * : "expanded", "collapsed" or "autocollapse" (see collapsible option)

Furthermore, the link to each country can be individually set using the following parameter names. If set to nothing it omits the country entirely. These parameters also work if a country is omitted by default because it didn't exist in the given year.

It's technically possible to input non-integer years like 1976.5, but that wouldn't make much sense, and year articles are not likely to exist for such years.

Examples
→

Example with custom title and links:

→

Note the (red) custom link for Indonesia.

Code for adding countries
where "Code" is a unique country-specific parameter name, "Years" is a series of years identifying periods of existence of a country (see below), and "Country name" is the country name that should be used for links. If the short-form name that should be displayed is different (for example "Georgia (country)" vs. "Georgia"), the parameter display name should be added; for countries whose names require the article "the" the parameter the is available. The sub-template Year in Asia/expr automatically compares the input year with the year criteria and creates the link.

"Years" is a series of up to six unnamed parameters where each pair of two identifies a time period in which the country existed. Omit either for an unbounded interval (since the first year or until the second year). Some examples:

By design, each interval includes the left endpoint and excludes the right endpoint. A country with the coding from the first example would therefore be listed if the input year is 1100, but not if the input year is 1300.

Limits
This template uses two parser functions for each included country. Because {{#ifexist}} is an expensive parser function, only 500 of these may be used on a given page (see Template limits). Depending on the number of countries in the given year, this template can therefore be transcluded only a few times on the same page, and if a page already uses a lot of expensive parser functions, adding it may cause the page to be automatically added to Category:Pages with too many expensive parser function calls.