Template:Email/doc: Difference between revisions
template>Tomoneill (includeonly) |
m (1 revision imported) |
(No difference)
|
Revision as of 15:40, 27 August 2024
The {{email}} template creates a link to an email address, showing either the e-mail address itself or replacement text (typically the name of the person to be emailed), followed by an icon to highlight that it is an external link.
{{Email|address}}
produces the same result as [Mailto:<span class="example" style="font-family: Georgia, 'DejaVu Serif', serif; color: var(--color-content-added, #006400);" >address</span> <span class="example" style="font-family: Georgia, 'DejaVu Serif', serif; color: var(--color-content-added, #006400);" >address</span>]
:
{{Email | John.Doe@hq.doe.gov}}
→ John.Doe@hq.doe.gov[Mailto:John.Doe@hq.doe.gov John.Doe@hq.doe.gov]
→ John.Doe@hq.doe.gov
You may make a link that sends an email to multiple addresses by entering multiple addresses separated by semicolons, such as {{Email | John.Doe@hq.doe.gov;Jane.Smith@science.doe.gov| John and Jane}}
, which would result in John and Jane.
Parameters
Parameter | Description | Notes |
---|---|---|
|address= |
The email address to link to. | Required. The |address= may be omitted if this is the first unnamed parameter.
|
|name= |
Name to use as the link text instead of displaying the email address. | Optional. The |name= may be omitted if this is the second unnamed parameter.
|
|sort= |
Enter the name in last name, first name order (or whatever other sort basis you prefer) if it is being used in a sortable table. | Optional. The |sort= may be omitted if it is the third unnamed parameter.
|
Examples
What you type | Results |
---|---|
{{email| John.Doe@hq.doe.gov}} | John.Doe@hq.doe.gov |
{{email| Jane.Smith@science.doe.gov}} | Jane.Smith@science.doe.gov |
{{email| name=James Johnson| address=JohnsonJ@nnsa.doe.gov}} | James Johnson |
{{email| JohnsonJ@nnsa.doe.gov| James Johnson}} | James Johnson |
Sorting
Click the up and down triangles after the column header in the second column to compare how the first table sorts by first name and the second by last name.
Without |sort=
| ||||||||
---|---|---|---|---|---|---|---|---|
{| class=sortable ! Names |- | {{email | charlie.indigo@hq.doe.gov | Charlie Indigo}} |- | {{email | Name=Roger Queen | Roger.Queen@hq.doe.gov}} |- | {{email | address=Pete.King@hq.doe.gov | name=Peter King}} |- | {{email | Address=george.love@hq.doe.gov | Name=George Love}} |- | {{email | Michael.Baker@HQ.DOE.Gov | name=Mike Baker}} |- | {{email | name=William Fox | address=Bill.Fox@hq.doe.gov }} |} |
| |||||||
With |sort=
| ||||||||
{| class=sortable ! Names |- | {{email | charlie.indigo@hq.doe.gov | Charlie Indigo | Indigo, Charlie}} |- | {{email | Name=Roger Queen | Roger.Queen@hq.doe.gov | Sort=Queen, Roger}} |- | {{email | address=Pete.King@hq.doe.gov | name=Peter King | sort=King, Peter}} |- | {{email | Address=george.love@hq.doe.gov | Name=George Love | Sort=Love, George}} |- | {{email | Michael.Baker@HQ.DOE.Gov | name=Mike Baker | sort=Baker, Mike}} |- | {{email | sort=Fox, William | name=William Fox | address=Bill.Fox@hq.doe.gov}} |} |
|