ਫਰਮਾ:IBA recipe
IBA recipe recipe at International Bartenders Association
Cocktaildb recipe: Mixed Drinks WikiProject link to IBA Official Cocktail Recipes
{{IBA recipe}} is used to generate a standardized link to IBA Official Cocktail recipes at the International Bartender Association. IBA Official Cocktails are given a special designation by the Mixed Drinks WikiProject, are an extremely reliable cocktail resource, with practically essentially no advertising (though the IBA itself is an industry organization). When available, the IBA recipes are the preferred recipe to be listed in the {{WPMIXInfobox}} source, and the infobox will default to the IBA if a sourcelink is given.
For template or usage questions, contact Willscrlt (original template developer).
Purpose
[ਸੋਧੋ]This template should be used exclusively for IBA Official Cocktail articles. If other you find it would be useful to extend this template somehow, please discuss it on this template's talk page.
By using this template instead of manually coding a link to the IBA's site, it will be easy to update all pages linking to IBA if the IBA site ever changes its site in a way that would normally break such links. If that happens, one change to this template should update all the links throughout Wikipedia at once.
It is important that the template is transcluded into the article, rather than substed in. Substituting breaks the dynamic connection to the template, and such pages will no longer dynamically update.
Usage
[ਸੋਧੋ]- Go to the IBA and locate the cocktail to which you wish to link.
- Click on the link to go to the cocktail's page. It usually opens in a separate window, so pop-up blockers may prevent you from seeing the page unless you allow it.
- The page URL should look like
http://www.iba-world.com/english/cocktails/DRINKNAME
, where "DRINKNAME" indicates the name of the drink. - Copy ONLY the name portion of the URL indicated by DRINKNAME above.
- If using the {{WPMIXInfobox}}:
- Make certain that there is a line named iba and that it is set to yes (this identifies the drink as an IBA Official Cocktail).
- Locate or add a line inside the infobox named sourcelink and add the DRINKNAME you copied.
{{WPMIXInfobox
| iba = yes
| sourcelink = DRINKNAME
- After saving the page, the infobox should update with the new information.
- If you are linking to the IBA recipe from an article or other page that is not directly concerned with an IBA Official Cocktail, then use the template as part of the External Links or other appropriate place:
- If one does not already exist, add a section named "External links" near the bottom of the wiki article.
- Add the following text to the external links section as shown:
==External links==
* {{IBA recipe|link=DRINKNAME|name=PRETTY NAME}}
- The asterisk (*) is to make the link be part of a bulleted list (since it's part of the list of external links).
- "DRINKNAME" is the name you've copied from the IBA URL. The link attribute is required.
- "PRETTY NAME" is the cocktail's name for display in the external link.
- If both the link and name attributes are the identical, the name parameter may be omitted and will default to the link attribute's value if omitted (or the name of the article if both are omitted).
Optional attributes
[ਸੋਧੋ]categories
[ਸੋਧੋ]By default, any article that uses this template is presumed to be a mixed-drink related article (otherwise use of this template in the article should be avoided). So, the article is automagically categorized under ਸ਼੍ਰੇਣੀ:WikiProject Mixed Drinks articles, which helps to alert Project Participants to the existence of the article.
This attribute is a somewhat "hidden" feature that allows demonstrating this template in places where the automagical categorization is undesirable. Any value other than no or iba is ignored and category information will be generated.
If set to no the template will display as normal, but all categories will be suppressed.
{{IBA recipe|link=DRINKNAME|name=PRETTY NAME|categories=no}}
If set to iba the template will display as normal, ਸ਼੍ਰੇਣੀ:WikiProject Mixed Drinks articles will be generated, and the category ਸ਼੍ਰੇਣੀ:IBA Official Cocktails will be added, too. This is not used with {{WPMIXInfobox}}, because the infobox automatically adds that category whenever iba=yes is set inside the infobox. This option is just in case the category is relevant somewhere where an infobox is not.
{{IBA recipe|link=DRINKNAME|name=PRETTY NAME|categories=no}}
info
[ਸੋਧੋ]Another somewhat "hidden" feature of this template is the automatic inclusion of the words "Information from the " prefixed to the output of this template. This is primarily for use within the {{WPMIXInfobox}} when the standardized recipe information used comes from the IBA. In the External links section and most other places, this would be undesirable.
The categories are automatically suppressed with this option, since the infobox adds the appropriate categories automatically, and it is silly to do so twice.
{{IBA recipe|link=DRINKNAME|name=PRETTY NAME|info=yes}}
Example
[ਸੋਧੋ]Searching for "Singapore Sling", you'll reach the page: http://www.iba-world.com/english/cocktails/ssling.php
Copy "ssling" from the URL and then add the following to External links in the Singapore Sling article:
* {{IBA recipe|link=ssling|name=Singapore Sling}}
- The result is:
To display the same information in WPMIXInfobox format, the following would be used:
* {{IBA recipe|link=ssling|name=Singapore Sling|info=yes}}
- The result is:
- Information from the Singapore Sling recipe at International Bartenders Association
If the template is used without the required link attribute, a link to the complete list is generated instead:
* {{IBA recipe|name=Singapore Sling}}
- The result is:
- This may not be the desirable output, unless your intention is to link to the full list of official cocktails.
- The template defaults to a search link because the developer feels that is preferable to generating a broken link, and the complete list might be useful in some situations.
- Missing linkss will result in the article being categorized under ਸ਼੍ਰੇਣੀ:WikiProject Mixed Drinks broken template implementations unless categories are suppressed.