Template:Email: Difference between revisions
template>Tomoneill (add cats) |
No edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 10: | Line 10: | ||
"params": { | "params": { | ||
"address": { | "address": { | ||
"example": "jane.smith@ | "example": "jane.smith@gmail.com", | ||
"aliases": [ | "aliases": [ | ||
"Address", | "Address", |
Latest revision as of 21:48, 16 September 2024
No email address found. Format is {{Email|email address}}.
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@gmail.com}}
→ John.Doe@gmail.com[Mailto:John.Doe@gmail.com John.Doe@gmail.com]
→ John.Doe@gmail.com
You may make a link that sends an email to multiple addresses by entering multiple addresses separated by semicolons, such as {{Email | John.Doe@gmail.com;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@gmail.com}} | John.Doe@gmail.com |
{{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@gmail.com | Charlie Indigo}} |- | {{email | Name=Roger Queen | Roger.Queen@gmail.com}} |- | {{email | address=Pete.King@gmail.com | name=Peter King}} |- | {{email | Address=george.love@gmail.com | Name=George Love}} |- | {{email | Michael.Baker@gmail.com | name=Mike Baker}} |- | {{email | name=William Fox | address=Bill.Fox@gmail.com }} |} |
| |||||||
With |sort=
| ||||||||
{| class=sortable ! Names |- | {{email | charlie.indigo@gmail.com | Charlie Indigo | Indigo, Charlie}} |- | {{email | Name=Roger Queen | Roger.Queen@gmail.com | Sort=Queen, Roger}} |- | {{email | address=Pete.King@gmail.com | name=Peter King | sort=King, Peter}} |- | {{email | Address=george.love@gmail.com | Name=George Love | Sort=Love, George}} |- | {{email | Michael.Baker@gmail.com | name=Mike Baker | sort=Baker, Mike}} |- | {{email | sort=Fox, William | name=William Fox | address=Bill.Fox@gmail.com}} |} |
|
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.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Email address | address Address 1 | If a name is not also provided, template will display and link to this email address. If a name is provided, it will be displayed, but the link will be to this email.
| String | required |
Name | name Name 2 | If a name is provided, the name will be displayed as a link, and the link will go to the specified email address.
| String | suggested |
Name, for sorting purposes | sort Sort 3 | You can respecify the name in the order it should be sorted in (typically lastname, firstname). This may be useful if you are using the template in a column of a sortable table.
| String | optional |