Template:Drinkboy recipe/doc

From Wikipedia, the free encyclopedia

This is the template documentation page for Template:Drinkboy recipe.

This page is not necessarily intended to be viewed directly. If it uses variables, some links may appear broken. Do not replace these variables with hardcoded page names or URLs.

Drinkboy recipe: Mixed Drinks WikiProject link to DrinkBoy.com Recipes

{{Drinkboy recipe}} is used to generate a standardized link to mixed drink recipes at DrinkBoy.com. DrinkBoy has been reviewed by participants of the Mixed Drinks WikiProject and several other editors at Wikipedia, and has been found to be a reliable mixed drink resource, with minimal commercial advertising.

For template or usage questions, contact Willscrlt (recent esoteric enhancements) or GeoffCapp (original template developer).

Contents

[edit] Purpose

This template should be used exclusively for mixed drink articles (i.e., cocktails), since it only links to the cocktails portion of the site. If other WikiProjects would find it useful to extend this template to include links to the Liquor, Tools, or Bars section of the site, please discuss it on this template's talk page.

By using this template instead of manually coding a link to DrinkBoy's site, it will be easy to update all pages linking to DrinkBoy if the DrinkBoy.com 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.

[edit] Usage

  • Go to DrinkBoy and locate the cocktail to which you wish to link.
  • Click on the link to go to the cocktail's page.
  • The page URL should look like http://www.drinkboy.com/Cocktails/recipes/DRINKNAME.html, where "DRINKNAME" indicates the name of the drink.
  • Copy ONLY the name portion of the URL indicated by DRINKNAME above (be sure to leave out the trailing ".html").
  • 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==
* {{Drinkboy 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 DrinkBoy 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).

[edit] Optional attributes

[edit] 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 Cat: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 is ignored and the category will be generated. If set to no the template will display as normal, but the category will be suppressed.

{{Drinkboy recipe|link=DRINKNAME|name=PRETTY NAME|categories=no}}

[edit] 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 DrinkBoy. 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 category, and it is silly to do so twice.

{{Drinkboy recipe|link=DRINKNAME|name=PRETTY NAME|info=yes}}

[edit] Examples

Searching for "Singapore Sling", you'll reach the page: http://www.drinkboy.com/cocktails/recipes/SingaporeSling.html

Copy "SingaporeSling" from the URL and then add the following to External links in the Singapore Sling article:

* {{Drinkboy recipe|link=SingaporeSling|name=Singapore Sling}}
The result is:
Note that in this example, the URL link at DrinkBoy does not contain a space, and in the pretty name we include one.

Searching for "Daiquiri", you'll reach the page: http://www.drinkboy.com/cocktails/recipes/Daiquiri.html

Copy "Daiquiri" from the URL and then add the following to External links in the Daiquiri article:

* {{Drinkboy recipe|link=Daiquiri}}
The result is:
Since Daiquiri is the same in the URL link and the pretty name, the pretty name may be omitted.

If the template is used without the required link attribute, the template will do it's best to generate a usable link by filling in the article's title:

* {{Drinkboy recipe}}
The result is:
Obviously on this page, this is not the desirable output. Similar results can occur if the article is moved or renamed, and usage in such cases will likely result in invalid links.
  • The template defaults to this behavior only because that is how the template was originally designed, and many articles rely upon that funcationality.
  • Missing links will result in the article being categorized under Cat:WikiProject Mixed Drinks broken template implementations unless categories are suppressed.


[edit] Template

The generic template is displayed below.