Template:IBA-cocktail/doc

This template is part of the IBA template family. It is used in the Bartending Guide Cocktails Glossary, but it is generic enough that it should be usable in other situations.

IBA templates

 * IBA-cocktail (or simply IBA - identifies cocktails that are recognized by the Bartending/Organizations/International Bartenders Association

Parameters

 * 1) The type of cocktail: One of three recognized values (although unrecognized or empty values will default to the value of "official")
 * 2) * "official" - For cocktails designated by the IBA as "Official Cocktails" of the IBA
 * 3) * "win" or "winning" - For cocktails selected as "Winning Cocktails" at an IBA competition
 * 4) Link ID or URL: This is an optional parameter. The IBA Website's URL have a unique parameter named "id". Entering the number here taken from the URL following "id=" will automatically generate a link to that page on the IBA Website. If the ID cannot be determined, you can copy the entire URL here; however, that might make it more difficult to update links later if the IBA changes things on their Website.
 * 5) Link text: This is an optional parameter. The template displays "Official Website" as the default text for any generated link. You may specify any text here to override the default. This either has to be the third parameter or the named parameter text=.

Examples
IBA-cocktail Produces the following output:
 * IBA-cocktail with no parameters

Produces the following output:
 * IBA-cocktail with "official" as the first parameter

Which is the same as was produced with the default values.

Produces the nearly the same output:
 * IBA-cocktail with "winning" as the first parameter

However, the color of the badge is different, and the text is wikilinked to a different part of the article.

Note that you could substitute the shorter "win" for "winning", and the result would be identical.

The complete URL for an Alexander (obtained by right-clicking on the IBA's link and opening the link in a new tab or window) is&#x003A;
 * IBA-cocktail with "official" as the first parameter and an ID for the second parameter


 * http://www.iba-world.com/index.php?option=com_content&id=89&tmpl=component&task=preview&Itemid=532

Note the bolded portion: "&id=89" The number 89 is the ID number that we need to use. Please do not confuse it with the "&Itemid=532" at the end of the URL; that is a completely different (and useless for us) part of the URL. Produces the following output:

Following the "Official Website" link above should take you directly to a slightly different page than you were on, but it should display the same drink along with additional information.

If you really like to be precise, you always can specify an ID value with the parameter name:

Winning Cocktails do not have individual pages, but are found on pages organized in multi-year collections. The URL for the IBA Winning Cocktails (2010-2019) collection is&#x003A;
 * IBA-cocktail with "winning" as the first parameter and an ID for the second parameter


 * http://www.iba-world.com/index.php?option=com_content&view=article&id=159&Itemid=530

Again, note the bolded portion: "&id=159" The number 159 is the ID number that we need to use to access that page. Please do not confuse it with the "&Itemid=530" at the end of the URL. Produces the following output:

Following the "Official Website" link above should take you back to the original page than you were on.

If you are unable to determine the correct ID number, you can try entering the full URL of the page. It is not the preferred way to do it, but it is better than not including any link. The parameter name "link=" is required for this to work.
 * Using full URLs for links

If you want to change the link text from "Official Website" to something else, like "Alexander: After Dinner Cocktail" or "IBA Winning Cocktails (2010 - 2019)", that is easy to do. Using the parameter name "text=" is strongly recommended, and it is required if the text contains certain special characters (the equals sign being the most notorious troublemaker).
 * Replacing the link text with default links