Template:Retrieved/sandbox
Retrieved 3 January 2025.
This is the template sandbox page for Template:Retrieved (diff). See also the companion subpage for test cases. |
This template implements Citation Style 1 template-like behavior regarding online-retrieval information ("Retrieved ..."), mainly as applied in {{cite web}}. It may be used with citation and external link templates that do not provide retrieval information, such as
and others; it may also be used to complement shortened footnote-producing templates such as {{harvnb}} and similar ( ). In addition, it may accompany other allowable external links when such usage is appropriate. Please see § Exceptions for recommended exceptions. This template and its documentation make use of Citation Style 1 guidelines, with variations. Per common practice, "link" refers to a source's online location and "source" to its online content.
Note: All examples in this documentation use this page's current timestamp to autoformat dates. Tomorrow's date may temporarily display as a result, depending on the local timezone, time of day and Wikipedia system settings. To apply the current timestamp manually, below.
the page. See also- Example:
A [[Brad Pitt]] statement.<ref>{{IMDb name|id=0000093|name=Brad Pitt}}. {{retrieved/sandbox |access-date=3 January 2025}}</ref>
===References===
{{reflist}}
- Generates:
Usage
|
Syntax and presentation
For basic usage the template requires only the date the source was retrieved (|access-date=<date>
), which displays in the editable default format Day Month Year after the static text "Retrieved". Insert this template next to the prerequisite external link-providing template or when appropriate, after any other allowable external link. Ideally, this template's output should immediately follow the external link, allowing for preceding white space as needed (note the editable default for "Retrieved" is to appear capitalized). Copy a blank version to use. All parameter names must be in lowercase. Use the "|" (pipe) character between each parameter. Delete unused parameters. The template uses Citation Style 1 presentation mode as the default; it may optionally use Citation Style 2 mode. See § Parameters for important details.
Exceptions
This template should not be used when either the link or the source is inaccessible or unfit for any reason. Use only with wikitext-supporting sources (free or restricted), retrievable through working, legitimate external links. See WP:LR.
The template should also not be used when retrieval information is inapplicable, superfluous, or not recommended, such as in External links or Further reading sections, or with templates such as {{official website}}.
In general, do not use with stable or static external links e.g. links to online archives or repositories (however, it may be used when accessing online archive snapshots). Please see WP:EL.
Examples
The examples in this section use the optional ISO date (ymd) format to input access dates. The same format – instead of the default dmy format – is used to display access dates, except as otherwise stated. See also Note above.
Basic usage with default date display format (dmy) [info]
{{retrieved/sandbox |access-date=2025-01-03}}
- Retrieved 3 January 2025.
Basic usage with optional date display format (ISO/ymd date) [info]
{{retrieved/sandbox |access-date=2025-01-03 |df=ymd}}
- Retrieved 2025-01-03.
Basic usage with optional date display format ("short" mdy) [info]
{{retrieved/sandbox |access-date=2025-01-03 |df=smdy}}
- Retrieved Jan 3, 2025.
Access information (registration) [info]
{{retrieved/sandbox |access-info=registration |access-date=2025-01-03 |df=iso}}
- . Retrieved 2025-01-03.
Access information (subscription) [info]
{{retrieved/sandbox |access-info=subscription |access-date=2025-01-03 |df=ymd}}
- . Retrieved 2025-01-03.
Source comment with default date format (version info) [info]
{{retrieved/sandbox |prepend=Revised |access-date=2025-01-03}}
- Revised. Retrieved 3 January 2025.
Source format (image) [info]
{{retrieved/sandbox |format=[[JPEG]] |access-date=2025-01-03 |df=ymd}}
- (JPEG). Retrieved 2025-01-03.
Online provider information [info]
{{retrieved/sandbox |access-date=2025-01-03 |df=ymd |via=OnlinePublisherName}}
- Retrieved 2025-01-03 – via OnlinePublisherName.
Link comment [info]
{{retrieved/sandbox |access-date=2025-01-03 |df=ymd |note=brief link note}}
- Retrieved 2025-01-03 (brief link note).
Custom terminal punctuation (semicolon) [info]
{{retrieved/sandbox |access-date=2025-01-03 |df=ymd |postscript=;}}
- Retrieved 2025-01-03;
No terminal punctuation [info]
{{retrieved/sandbox |access-date=2025-01-03 |df=ymd |postscript=none}}
- Retrieved 2025-01-03
All parameters in stated default presentation mode (Citation Style 1) [info]
{{retrieved/sandbox |access-info=limited |prepend=. Saved 2025-01-03 |format=[[DWG]] |access-date=2025-01-03 |df=ymd |via=[[Wayback Machine]] |note=[[Snapshot (computer storage)|snapshot]] link |mode=cs1 |postscript=none}}
- . Saved 2025-01-03 (DWG). Retrieved 2025-01-03 – via Wayback Machine (archive snapshot link)
All parameters with optional presentation mode (Citation Style 2) and stated default date display format [info]
{{retrieved/sandbox |access-info=limited |prepend=, saved 2025-01-03 |format=[[DWG]] |access-date=2025-01-03 |df=dmy |via=[[Wayback Machine]] |note=[[Snapshot (computer storage)|snapshot]] link |mode=cs2 |postscript=;}}
- , saved 2025-01-03 (DWG), retrieved 3 January 2025 – via Wayback Machine (archive snapshot link);
Parameters
General notes
Depending on parameter usage, the template's output may display default presentation and formatting elements including static text, white space and other punctuation.
Parameters should provide retrieval information specific to the retrieved version of the source or to the specific access link. Do not add an optional parameter if identical information is provided in the source's external link template, full citation, or other reference data (the access date is required regardless of duplication). However, always include parameter access-info wherever applicable, as it is relevant to reader decisions regarding retrieval.
Required
The only required parameter is access-date or its alias accessdate.
Description
Access date
- access-date: This parameter (or its alias accessdate) is required – its omission will produce an error message. For basic template usage, insert only this parameter. Enter the full date the external link: (a) was successfully accessed and (b) correctly targeted content supporting the related wikitext. Do not wikilink. Displays after the static text "Retrieved" in Day Month Year (dmy) format, irrespective of the way it is entered. To display in a different format use parameter df (date format). Please follow the format, if any, established in the article’s citations and/or references. See also WP:DATE and WP:DATEUNIFY [examples]
- Incomplete access dates (e.g. missing the day or month) may produce inaccurate date display or errors.
- Tomorrow's date will display as access date without error; dates further in the future will display an error message.
Access information
- access-info: If the online source has access requirements or restrictions, use this parameter to add an indicative inline icon (includes tooltip). Ideally it should display immediately after the external link, preceded by a user-entered or pre-existing non-breaking space positioned before the template code. This parameter displays before the static text "Retrieved" [examples]
|access-info=registration
– free registration is required; displays a gray lock icon.|access-info=limited
– free access is limited e.g. based on number of views, or is time-limited, or is only partially free; displays the same gray lock icon as registration, but with different tooltip text.|access-info=subscription
– paid subscription is required (WP:PAYWALL); displays a red lock icon. When set, the edited page will be added to Category:Pages containing links to subscription-only content.
Source comment, link comment
- prepend: Use for additional citable information specific to the retrieved version, only if necessary for clarity. This parameter displays before the static text "Retrieved" [example].
- note: Use to add a brief relevant comment specific to the accessed link. Displays in parentheses after the access date or parameter via [example].
Additional information: source format, online provider
- format: Use only when the retrieved version has special format requirements or is in a different format from the original. Displays within parentheses. May be wikilinked. This parameter displays before the static text "Retrieved" [example].
- via: Use to cite the online provider specific to the source’s accessed version if said provider is different from the original provider or publisher. May be wikilinked. Includes the leading static text "via" preceded by a spaced en dash and followed by a space. Displays after the access date [example].
Display options: date format, presentation mode, terminal punctuation
- df: Use to change the date format displayed by access-date; the autodisplayed default is Day Month Year (dmy) [examples], [more examples]
|df=ymd
or|df=iso
– displays in the numeric year-month-date (ISO date) format.|df=mdy
– displays as Month Day, Year.|df=smdy
– displays as Month Day, Year but with "short" (abbreviated) month name.|df=dmy
– the autodisplayed default (Day Month Year) stated explicitly.|df=sdmy
– displays the default format but with "short" (abbreviated) month name.
- mode: Use to change the template presentation mode affecting element separators, terminal punctuation, and certain capitalization; the default is Citation Style 1 mode. To override default terminal punctuation regardless of mode use postscript [examples]
|mode=cs2
– insert to switch to Citation Style 2 mode: the separator may include white space and/or a non-wrapping comma ( , ) or dash, terminal punctuation is omitted, and the static text "retrieved" is in lowercase.|mode=cs1
– the default presentation mode; enter to explicitly state/switch back to the Citation Style 1 mode: the separator may include white space and/or a non-wrapping period ( . ) or dash, terminal punctuation is a non-wrapping period, and the static text "Retrieved" is capitalized.
- postscript: Use to replace the presentation mode's default terminal punctuation. To remove terminal punctuation altogether, insert
|postscript=none
[examples].
With short citations
Short citations (WP:SFN) may include external links as in-source locations and be subject to the same retrieval information guidelines applying to full citations.[a] This template may be used to complement select short citation-producing templates, e.g. {{harvnb}}. .
- Example:
A wikitext statement.<ref>{{harvnb|AuthorLast|2025|pp=[https://www.example.com 23–24]}}{{nbsp}}{{retrieved/sandbox |access-info=subscription |access-date=3 January 2025}}</ref>
===Notes===
{{reflist}}
===References===
{{refbegin}}
* {{cite journal |author-last=AuthorLast |date=January 2025 |title=ArticleTitle |journal=JournalName |issue=5 |pages=21–35 |url=https://example.com |url-access=limited |access-date=3 January 2025}}
{{refend}}
- Generates:
Notes
- ^ AuthorLast 2025, pp. 23–24 . Retrieved 3 January 2025.
References
- AuthorLast (January 2025). "ArticleTitle". JournalName (5): 21–35. Retrieved 3 January 2025.
In this example {{harvnb}} is followed by a non-breaking space, to provide continuity and context relative to the output of {{retrieved}}.
- ^ The full citation's retrieval information may not apply to specific in-source locations; depending on access date, the state of external links or the sources' content may vary; and specific in-source locations may have different access requirements.
Error messages
Access date is missing
{{retrieved/sandbox |access-info=subscription |via=Online Publisher}}
Access date too far in the future
{{retrieved/sandbox |access-info=subscription |access-date=2025-01-05 |note=brief link note}}
- . Retrieved ! Invalid access date [info] ! (brief link note).
See also
TemplateData
TemplateData for Retrieved
This template adds online-retrieval information ("Retrieved ...") to external link templates that do not provide such facility; for additional use cases see the template's documentation
Parameter | Description | Type | Status | |
---|---|---|---|---|
Access information | access-info | Recommended when the source has access restrictions; use one of 'registration', 'subscription' or 'limited' (without the single quote marks), displays a relevant lock icon before "Retrieved" | String | optional |
Source comment | prepend | Use only when additional citable information specific to the retrieved version is needed for clarity; displays before "Retrieved" | String | optional |
Source format | format | Use only if the retrieved version is in different format than the original, or has specific format requirements; may be wikilinked, displays before "Retrieved" | String | optional |
Access date | access-date accessdate | The full date the external link (a) was successfully accessed, and (b) targeted relevant wikitext-supporting content; autodisplays as Day Month Year (dmy). See 'Access date format' for other display options; do not wikilink | Date | required |
Access date format | df | Optional access date display format, the autodisplayed default is 'dmy' (Day Month Year); use 'ymd' or 'iso' for numeric year-month-date, 'mdy' for Month Day, Year, 'smdy' for Month Day, Year with abbreviated month name, 'sdmy' for Day Month Year with abbreviated month name (omit the single quote marks) | String | optional |
Online provider | via | Name of the accessed version's online provider if other than the publisher; may be wikilinked | String | optional |
Link comment | note | When required for clarification, add a brief note specific to the accessed link | String | optional |
Presentation mode | mode | Presentation mode affecting static text, parameter separators and terminal punctuation. Default is Citation Style 1 mode; use 'cs2' for Citation Style 2, or 'cs1' to switch to/state the default (ommit the single quote marks) | String | optional |
Terminal punctuation | postscript | Insert desired value to replace the presentation mode's default terminal punctuation; to remove terminal punctuation enter 'none' without the quote marks | String | optional |