Template:Email/doc: Difference between revisions
m (1 revision imported) |
No edit summary |
||
Line 3: | Line 3: | ||
{{tlx|Email|{{xt|address}}}} produces the same result as {{code | <nowiki>[Mailto:</nowiki>{{xt|address}} {{xt|address}}]}}: | {{tlx|Email|{{xt|address}}}} produces the same result as {{code | <nowiki>[Mailto:</nowiki>{{xt|address}} {{xt|address}}]}}: | ||
* {{tlx |Email | John.Doe@ | * {{tlx |Email | John.Doe@gmail.com}} → {{Email | John.Doe@gmail.com}} | ||
* {{code | <nowiki>[Mailto:</nowiki>John.Doe@ | * {{code | <nowiki>[Mailto:</nowiki>John.Doe@gmail.com John.Doe@gmail.com]}} → [Mailto: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 {{tlx|Email | {{xt|John.Doe@ | You may make a link that sends an email to multiple addresses by entering multiple addresses separated by semicolons, such as {{tlx|Email | {{xt|John.Doe@gmail.com;Jane.Smith@science.doe.gov}} | {{xt|John and Jane}}}}, which would result in {{Email | John.Doe@gmail.com;Jane.Smith@science.doe.gov | John and Jane}}. | ||
==Parameters== | ==Parameters== | ||
Line 23: | Line 23: | ||
! What you type !! Results | ! What you type !! Results | ||
|- valign=top | |- valign=top | ||
| {{tld | email | John.Doe@ | | {{tld | email | John.Doe@gmail.com}} || {{email | John.Doe@gmail.com}} | ||
|- valign=top | |- valign=top | ||
| {{tld | email | Jane.Smith@science.doe.gov}} || {{email | Jane.Smith@science.doe.gov}} | | {{tld | email | Jane.Smith@science.doe.gov}} || {{email | Jane.Smith@science.doe.gov}} | ||
Line 43: | Line 43: | ||
! Names | ! Names | ||
|- | |- | ||
| {{email | charlie.indigo@ | | {{email | charlie.indigo@gmail.com | Charlie Indigo}} | ||
|- | |- | ||
| {{email | Name=Roger Queen | Roger.Queen@ | | {{email | Name=Roger Queen | Roger.Queen@gmail.com}} | ||
|- | |- | ||
| {{email | address=Pete.King@ | | {{email | address=Pete.King@gmail.com | name=Peter King}} | ||
|- | |- | ||
| {{email | Address=george.love@ | | {{email | Address=george.love@gmail.com | Name=George Love}} | ||
|- | |- | ||
| {{email | Michael.Baker@ | | {{email | Michael.Baker@gmail.com | name=Mike Baker}} | ||
|- | |- | ||
| {{email | name=William Fox | address=Bill.Fox@ | | {{email | name=William Fox | address=Bill.Fox@gmail.com }} | ||
|}</nowiki>}} | |}</nowiki>}} | ||
| | | | ||
Line 59: | Line 59: | ||
! Names | ! Names | ||
|- | |- | ||
| {{email | charlie.indigo@ | | {{email | charlie.indigo@gmail.com | Charlie Indigo}} | ||
|- | |- | ||
| {{email | Name=Roger Queen | Roger.Queen@ | | {{email | Name=Roger Queen | Roger.Queen@gmail.com}} | ||
|- | |- | ||
| {{email | address=Pete.King@ | | {{email | address=Pete.King@gmail.com | name=Peter King}} | ||
|- | |- | ||
| {{email | Address=george.love@ | | {{email | Address=george.love@gmail.com | Name=George Love}} | ||
|- | |- | ||
| {{email | Michael.Baker@ | | {{email | Michael.Baker@gmail.com | name=Mike Baker}} | ||
|- | |- | ||
| {{email | name=William Fox | address=Bill.Fox@ | | {{email | name=William Fox | address=Bill.Fox@gmail.com}} | ||
|} | |} | ||
|- | |- | ||
Line 79: | Line 79: | ||
! Names | ! Names | ||
|- | |- | ||
| {{email | charlie.indigo@ | | {{email | charlie.indigo@gmail.com | Charlie Indigo | Indigo, Charlie}} | ||
|- | |- | ||
| {{email | Name=Roger Queen | Roger.Queen@ | | {{email | Name=Roger Queen | Roger.Queen@gmail.com | Sort=Queen, Roger}} | ||
|- | |- | ||
| {{email | address=Pete.King@ | | {{email | address=Pete.King@gmail.com | name=Peter King | sort=King, Peter}} | ||
|- | |- | ||
| {{email | Address=george.love@ | | {{email | Address=george.love@gmail.com | Name=George Love | Sort=Love, George}} | ||
|- | |- | ||
| {{email | Michael.Baker@ | | {{email | Michael.Baker@gmail.com | name=Mike Baker | sort=Baker, Mike}} | ||
|- | |- | ||
| {{email | sort=Fox, William | name=William Fox | address=Bill.Fox@ | | {{email | sort=Fox, William | name=William Fox | address=Bill.Fox@gmail.com}} | ||
|}</nowiki>}} | |}</nowiki>}} | ||
| | | | ||
Line 95: | Line 95: | ||
! Names | ! Names | ||
|- | |- | ||
| {{email | charlie.indigo@ | | {{email | charlie.indigo@gmail.com | Charlie Indigo | Indigo, Charlie}} | ||
|- | |- | ||
| {{email | Name=Roger Queen | Roger.Queen@ | | {{email | Name=Roger Queen | Roger.Queen@gmail.com | Sort=Queen, Roger}} | ||
|- | |- | ||
| {{email | address=Pete.King@ | | {{email | address=Pete.King@gmail.com | name=Peter King | sort=King, Peter}} | ||
|- | |- | ||
| {{email | Address=george.love@ | | {{email | Address=george.love@gmail.com | Name=George Love | Sort=Love, George}} | ||
|- | |- | ||
| {{email | Michael.Baker@ | | {{email | Michael.Baker@gmail.com | name=Mike Baker | sort=Baker, Mike}} | ||
|- | |- | ||
| {{email | sort=Fox, William | name=William Fox | address=Bill.Fox@ | | {{email | sort=Fox, William | name=William Fox | address=Bill.Fox@gmail.com}} | ||
|} | |} | ||
|} | |} |
Latest revision as of 21:48, 16 September 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@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}} |} |
|