Misplaced Pages

Template:Exchange rate: Difference between revisions

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
Browse history interactively← Previous editNext edit →Content deleted Content addedVisualWikitext
Revision as of 21:02, 10 August 2018 view sourceJonesey95 (talk | contribs)Autopatrolled, Extended confirmed users, Page movers, Mass message senders, Template editors375,663 edits close caption tag← Previous edit Revision as of 09:59, 22 September 2018 view source Elegie (talk | contribs)Extended confirmed users2,478 edits Use HTTPS for the XE home page link and use up-to-date HTTPS URLs for the XE currency conversion links in order to provide increased privacy and security for users. (From what it appears, the existing XE currency conversion HTTP URLs would generate a 301 redirect to an HTTPS URL which would generate a 301 redirect to another HTTPS URL. Also, the XE home page HTTP URL would generate a 301 redirect to an HTTPS URL.)Next edit →
Line 18: Line 18:
|}} |}}
|- |-
| From : | From :
|{{#ifeq:{{{1}}}|AUD||}} {{#ifeq:{{{1}}}|CAD||}} {{#ifeq:{{{1}}}|CHF||}} {{#ifeq:{{{1}}}|EUR||}} {{#ifeq:{{{1}}}|GBP||}} {{#ifeq:{{{1}}}|HKD||}} {{#ifeq:{{{1}}}|JPY||}} {{#ifeq:{{{1}}}|USD||}} {{#if:{{{2|}}} |{{#ifeq:{{{1}}}|AUD||}} {{#ifeq:{{{1}}}|CAD||}} {{#ifeq:{{{1}}}|CHF||}} {{#ifeq:{{{1}}}|EUR||}} {{#ifeq:{{{1}}}|GBP||}} {{#ifeq:{{{1}}}|HKD||}} {{#ifeq:{{{1}}}|JPY||}} {{#ifeq:{{{1}}}|USD||}} {{#if:{{{2|}}}
|}} {{#if:{{{3|}}} |}} {{#if:{{{3|}}}
|}} {{#if:{{{4|}}} |}} {{#if:{{{4|}}}
|}} |}}
|- |-
| From : | From :

Revision as of 09:59, 22 September 2018

Current exchange rates
From Google Finance: AUD CAD CHF EUR GBP HKD JPY USD
From Yahoo! Finance: AUD CAD CHF EUR GBP HKD JPY USD
From XE: AUD CAD CHF EUR GBP HKD JPY USD
From OANDA: AUD CAD CHF EUR GBP HKD JPY USD
From fxtop.com: AUD CAD CHF EUR GBP HKD JPY USD
Template documentation[view] [edit] [history] [purge]

Usage

This template only requires the currency code. Place it in the first parameter, as in the following example:

{{Exchange rate|TWD}}

which produces

Current TWD exchange rates
From Google Finance: AUD CAD CHF EUR GBP HKD JPY USD
From Yahoo! Finance: AUD CAD CHF EUR GBP HKD JPY USD
From XE: AUD CAD CHF EUR GBP HKD JPY USD
From OANDA: AUD CAD CHF EUR GBP HKD JPY USD
From fxtop.com: AUD CAD CHF EUR GBP HKD JPY USD

Additional currencies

You may also specify up to three additional foreign currencies.

{{Exchange rate|SGD|MYR|THB|IDR}}

produces

Current SGD exchange rates
From Google Finance: AUD CAD CHF EUR GBP HKD JPY USD MYR THB IDR
From Yahoo! Finance: AUD CAD CHF EUR GBP HKD JPY USD MYR THB IDR
From XE: AUD CAD CHF EUR GBP HKD JPY USD MYR THB IDR
From OANDA: AUD CAD CHF EUR GBP HKD JPY USD MYR THB IDR
From fxtop.com: AUD CAD CHF EUR GBP HKD JPY USD MYR THB IDR

Alternative layouts

If you don't like navbox style you can specify style = h3 or style = h2 which produces something more like standard text. Using header = h3 or header = h2 also have the same effect.

{{Exchange rate|EUR|style=h3}}

produces

Current EUR exchange rates

From Google Finance: AUD CAD CHF GBP HKD JPY USD
From Yahoo! Finance: AUD CAD CHF GBP HKD JPY USD
From XE: AUD CAD CHF GBP HKD JPY USD
From OANDA: AUD CAD CHF GBP HKD JPY USD
From fxtop.com: AUD CAD CHF GBP HKD JPY USD

The |style= parameter overrides the |header= parameter, but not vice versa. Thus, if the template is called with header = h3 but style = navbox, it will display as a navbox. If it is called with header = h3 and no specification for |style=, on the other hand, |header= will be used and it will show up as text instead of as a nabvox.


You may specify header = h3 or header = h2 so that the mock header looks like the level 3 header or level 2 header, respectively. By default, the template displays like a navbox. This template currently only supports an overridden mock headers 2 and 3, not level 4, 5, or 6.

{{Exchange rate|EUR|header = h3}}

produces

Current EUR exchange rates

From Google Finance: AUD CAD CHF GBP HKD JPY USD
From Yahoo! Finance: AUD CAD CHF GBP HKD JPY USD
From XE: AUD CAD CHF GBP HKD JPY USD
From OANDA: AUD CAD CHF GBP HKD JPY USD
From fxtop.com: AUD CAD CHF GBP HKD JPY USD

Sites managed

  • Google finance : live exchange rates with history since mid 2003
  • Yahoo! Finance : currency converter with pocket guide
  • XE : currency converter and 10 years history charts
  • OANDA : currency converter, pocket guide, live exchange rates, with history since 1990

Caveat

  • While "Current XYZ exchange rates" maintains the appearance of a section heading, it is not. This was done to avoid having a section-edit link on the right so that people won't accidentally change the template. However, the side effect of that is the font size won't change in IE (at least IE 6) when enlarging or shrinking the text size.

Choice of currencies

Currently, the list include 9 default currencies. They are the top 9 most traded currencies in the world, according to Bank for International Settlements . Most of them are also part of Bloomberg's benchmark currencies list . They also represent top 8 official foreign exchange reserve in the world according to International Monetary Fund .

Template data

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Exchange rate in articles based on its TemplateData.

TemplateData for Exchange rate

Display a table link to exchange rates between a currency to one of the top 9 most traded currencies in the world, and, optionally, three other currencies.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Currency code1

The currency code to be used in this template.

Stringrequired
Additional currency2

Additional currency that will have links to exchange rate, such as a currency of a neighboring country that are not among the default ones.

Stringoptional
Second additional currency3

Additional currency that will have links to exchange rate, such as a currency of a neighboring country that are not among the default ones.

Stringoptional
Third additional currency4

Additional currency that will have links to exchange rate, such as a currency of a neighboring country that are not among the default ones.

Stringoptional
Layoutstyle layout

Specify an alternative layout to use instead of a navbox.

Stringoptional
Header styleheader

Specify a header level to use. An alternative layout will be automatically used unless "Layout" parameter is set to navbox.

Stringoptional
Notenote

Add an additional note at the bottom of this template.

Unknownoptional

See also

The above documentation is transcluded from Template:Exchange rate/doc. (edit | history)
Editors can experiment in this template's sandbox (edit | diff) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this template.


Categories: