Redigerer
Mal:IBA-oppskrift/dok
Hopp til navigering
Hopp til søk
Advarsel:
Du er ikke innlogget. IP-adressen din vil bli vist offentlig om du redigerer. Hvis du
logger inn
eller
oppretter en konto
vil redigeringene dine tilskrives brukernavnet ditt, og du vil få flere andre fordeler.
Antispamsjekk.
Ikke
fyll inn dette feltet!
{{Documentation subpage}} <big style="font-size:140%">''Cocktaildb recipe:'' '''[[WP:MIX|Mixed Drinks WikiProject]] link to IBA Official Cocktail Recipes'''</big> <!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE --> {{tl|IBA recipe}} is used to generate a standardized link to [[IBA Official Cocktail]] recipes at the [http://www.iba-world.com/english/cocktails/ International Bartender Association]. IBA Official Cocktails are given a special designation by the Mixed Drinks WikiProject, are an extremely [[WP:RS|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 {{tl|WPMIXInfobox}} source, and the infobox will default to the IBA if a ''sourcelink'' is given. <small>For template or usage questions, contact [[User talk:Willscrlt|Willscrlt]] (original template developer).</small> ==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 [[Template talk:IBA recipe|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 [[Wikipedia:Transclusion|transcluded]] into the article, rather than '''[[WP:SUBST|subst]]'''ed in. Substituting breaks the dynamic connection to the template, and such pages will no longer dynamically update. ==Usage== * Go to the [http://www.iba-world.com/english/cocktails/ 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 <code><nowiki>http://www.iba-world.com/english/cocktails/DRINKNAME.php</nowiki></code>, 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 ".php"). * If using the {{tl|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. <code><nowiki>{{</nowiki>WPMIXInfobox</code> <code>| iba = yes</code> <code>'''| sourcelink = ''DRINKNAME'''''</code> ** 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: <code><nowiki>==External links==</nowiki></code> <code><nowiki>* {{IBA recipe|link=DRINKNAME|name=PRETTY NAME}}</nowiki></code> *** 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 {{cl|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. <code><nowiki>{{</nowiki>IBA recipe|link=DRINKNAME|name=PRETTY NAME'''|categories=no'''<nowiki>}}</nowiki></code> If set to ''iba'' the template will display as normal, {{cl|WikiProject Mixed Drinks articles}} will be generated, '''and''' the category {{cl|IBA Official Cocktails}} will be added, too. This is not used with {{tl|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. <code><nowiki>{{</nowiki>IBA recipe|link=DRINKNAME|name=PRETTY NAME'''|categories=no'''<nowiki>}}</nowiki></code> ===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 {{tl|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. <code><nowiki>{{</nowiki>IBA recipe|link=DRINKNAME|name=PRETTY NAME'''|info=yes'''<nowiki>}}</nowiki></code> ==Example== Searching for "''Singapore Sling''", you'll reach the page: [http://www.iba-world.com/english/cocktails/ssling.php 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: <code><nowiki>* {{</nowiki>IBA recipe|link='''ssling'''|name='''Singapore Sling'''<nowiki>}}</nowiki></code> : The result is: :* {{IBA recipe|link=ssling|name=Singapore Sling|categories=no}} To display the same information in WPMIXInfobox format, the following would be used: <code><nowiki>* {{</nowiki>IBA recipe|link=ssling|name='''Singapore Sling'''|info=yes<nowiki>}}</nowiki></code> : The result is: :* {{IBA recipe|link=ssling|name=Singapore Sling|info=yes}} If the template is used without the required ''link'' attribute, a link to the complete list is generated instead: <code><nowiki>* {{</nowiki>IBA recipe|name='''Singapore Sling'''<nowiki>}}</nowiki></code> : The result is: :* {{IBA recipe|name=Singapore Sling|categories=no}} : 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 ''links''s will result in the article being categorized under {{cl|WikiProject Mixed Drinks broken template implementations}} unless categories are suppressed. <includeonly> <!-- ADD CATEGORIES BELOW THIS LINE --> [[Category:Beverages Task Force templates]] [[Category:Drink external link templates]] <!-- ADD INTERWIKIS BELOW THIS LINE --> [[no:mal:IBA recipe/dokumentasjon]] </includeonly>
Redigeringsforklaring:
Merk at alle bidrag til Wikisida.no anses som frigitt under Creative Commons Navngivelse-DelPåSammeVilkår (se
Wikisida.no:Opphavsrett
for detaljer). Om du ikke vil at ditt materiale skal kunne redigeres og distribueres fritt må du ikke lagre det her.
Du lover oss også at du har skrevet teksten selv, eller kopiert den fra en kilde i offentlig eie eller en annen fri ressurs.
Ikke lagre opphavsrettsbeskyttet materiale uten tillatelse!
Avbryt
Redigeringshjelp
(åpnes i et nytt vindu)
Forhåndsvis en side som bruker denne malen
Denne siden er medlem av 1 skjult kategori:
Kategori:Sider hvor ekspansjonsdybden er overskredet
Navigasjonsmeny
Personlige verktøy
Ikke logget inn
Brukerdiskusjon
Bidrag
Opprett konto
Logg inn
Navnerom
Mal
Diskusjon
norsk bokmål
Visninger
Les
Rediger kilde
Vis historikk
Mer
Navigasjon
Forside
Siste endringer
Tilfeldig side
Hjelp til MediaWiki
Verktøy
Lenker hit
Relaterte endringer
Spesialsider
Sideinformasjon