Template:Email/doc: Difference between revisions

From Saintapedia
Jump to navigation Jump to search
template>Tomoneill
(includeonly)
 
No edit summary
 
(One intermediate revision by one other user not shown)
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@hq.doe.gov}} → {{Email | John.Doe@hq.doe.gov}}
* {{tlx |Email | John.Doe@gmail.com}} → {{Email | John.Doe@gmail.com}}
* {{code | <nowiki>[Mailto:</nowiki>John.Doe@hq.doe.gov John.Doe@hq.doe.gov]}} → [Mailto:John.Doe@hq.doe.gov John.Doe@hq.doe.gov]
* {{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@hq.doe.gov;Jane.Smith@science.doe.gov}} | {{xt|John and Jane}}}}, which would result in {{Email | John.Doe@hq.doe.gov;Jane.Smith@science.doe.gov | John and Jane}}.
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@hq.doe.gov}} || {{email | John.Doe@hq.doe.gov}}
| {{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@hq.doe.gov | Charlie Indigo}}
| {{email | charlie.indigo@gmail.com | Charlie Indigo}}
|-
|-
| {{email | Name=Roger Queen | Roger.Queen@hq.doe.gov}}
| {{email | Name=Roger Queen | Roger.Queen@gmail.com}}
|-
|-
| {{email | address=Pete.King@hq.doe.gov | name=Peter King}}
| {{email | address=Pete.King@gmail.com | name=Peter King}}
|-
|-
| {{email | Address=george.love@hq.doe.gov | Name=George Love}}
| {{email | Address=george.love@gmail.com | Name=George Love}}
|-
|-
| {{email | Michael.Baker@HQ.DOE.Gov | name=Mike Baker}}
| {{email | Michael.Baker@gmail.com | name=Mike Baker}}
|-
|-
| {{email | name=William Fox | address=Bill.Fox@hq.doe.gov }}
| {{email | name=William Fox | address=Bill.Fox@gmail.com }}
|}</nowiki>}}
|}</nowiki>}}
|  
|  
Line 59: Line 59:
! Names
! Names
|-
|-
| {{email | charlie.indigo@hq.doe.gov | Charlie Indigo}}
| {{email | charlie.indigo@gmail.com | Charlie Indigo}}
|-
|-
| {{email | Name=Roger Queen | Roger.Queen@hq.doe.gov}}
| {{email | Name=Roger Queen | Roger.Queen@gmail.com}}
|-
|-
| {{email | address=Pete.King@hq.doe.gov | name=Peter King}}
| {{email | address=Pete.King@gmail.com | name=Peter King}}
|-
|-
| {{email | Address=george.love@hq.doe.gov | Name=George Love}}
| {{email | Address=george.love@gmail.com | Name=George Love}}
|-
|-
| {{email | Michael.Baker@HQ.DOE.Gov | name=Mike Baker}}
| {{email | Michael.Baker@gmail.com | name=Mike Baker}}
|-
|-
| {{email | name=William Fox | address=Bill.Fox@hq.doe.gov}}
| {{email | name=William Fox | address=Bill.Fox@gmail.com}}
|}
|}
|-
|-
Line 79: Line 79:
! Names
! Names
|-  
|-  
| {{email | charlie.indigo@hq.doe.gov | Charlie Indigo | Indigo, Charlie}}
| {{email | charlie.indigo@gmail.com | Charlie Indigo | Indigo, Charlie}}
|-
|-
| {{email | Name=Roger Queen | Roger.Queen@hq.doe.gov | Sort=Queen, Roger}}
| {{email | Name=Roger Queen | Roger.Queen@gmail.com | Sort=Queen, Roger}}
|-
|-
| {{email | address=Pete.King@hq.doe.gov | name=Peter King | sort=King, Peter}}
| {{email | address=Pete.King@gmail.com | name=Peter King | sort=King, Peter}}
|-
|-
| {{email | Address=george.love@hq.doe.gov | Name=George Love | Sort=Love, George}}
| {{email | Address=george.love@gmail.com | Name=George Love | Sort=Love, George}}
|-
|-
| {{email | Michael.Baker@HQ.DOE.Gov | name=Mike Baker | sort=Baker, Mike}}
| {{email | Michael.Baker@gmail.com | name=Mike Baker | sort=Baker, Mike}}
|-
|-
| {{email | sort=Fox, William | name=William Fox | address=Bill.Fox@hq.doe.gov}}
| {{email | sort=Fox, William | name=William Fox | address=Bill.Fox@gmail.com}}
|}</nowiki>}}
|}</nowiki>}}
|  
|  
Line 95: Line 95:
! Names
! Names
|-
|-
| {{email | charlie.indigo@hq.doe.gov | Charlie Indigo | Indigo, Charlie}}
| {{email | charlie.indigo@gmail.com | Charlie Indigo | Indigo, Charlie}}
|-
|-
| {{email | Name=Roger Queen | Roger.Queen@hq.doe.gov | Sort=Queen, Roger}}
| {{email | Name=Roger Queen | Roger.Queen@gmail.com | Sort=Queen, Roger}}
|-
|-
| {{email | address=Pete.King@hq.doe.gov | name=Peter King | sort=King, Peter}}
| {{email | address=Pete.King@gmail.com | name=Peter King | sort=King, Peter}}
|-
|-
| {{email | Address=george.love@hq.doe.gov | Name=George Love | Sort=Love, George}}
| {{email | Address=george.love@gmail.com | Name=George Love | Sort=Love, George}}
|-
|-
| {{email | Michael.Baker@HQ.DOE.Gov | name=Mike Baker | sort=Baker, Mike}}
| {{email | Michael.Baker@gmail.com | name=Mike Baker | sort=Baker, Mike}}
|-
|-
| {{email | sort=Fox, William | name=William Fox | address=Bill.Fox@hq.doe.gov}}
| {{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>]:

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 }}
|}
Names
Charlie Indigo
Roger Queen
Peter King
George Love
Mike Baker
William Fox
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}}
|}
Names
Charlie Indigo
Roger Queen
Peter King
George Love
Mike Baker
William Fox