Template:US government sources/sandbox: Difference between revisions
sync |
handle sourceURL separately |
||
Line 1: | Line 1: | ||
<noinclude> |
<noinclude> |
||
{{for|other templates related to the US government|Template:Government of the United States}} |
{{for|other templates related to the US government|Template:Government of the United States}} |
||
</noinclude>{{#invoke:Template wrapper|wrap|_template=Include-USGov|_alias-map=accessdate:access-date |
</noinclude>{{#if:{{{sourceURL|}}}|{{source-attribution|1={{if first then both|{{{author|}}}|,{{sp}}}}{{{sourceURL}}}{{if second then both|,{{sp}}|{{{access-date|{{{accessdate}}}}}}}}}}|{{#invoke:Template wrapper|wrap|_template=Include-USGov|_alias-map=accessdate:access-date|agency=United States Government}}<includeonly>[[Category:Wikipedia articles incorporating text from public domain works of the United States Government]]</includeonly><noinclude>{{Documentation}} |
||
</noinclude> |
</noinclude> |
Revision as of 03:56, 7 October 2022
{{#if:| This article incorporates text from this source, which is in the public domain: Template:If first then both{{{sourceURL}}}Template:If second then both| This article incorporates public domain material from websites or documents of the United States Government.
This is the template sandbox page for Template:US government sources (diff). See also the companion subpage for test cases. |
This template is used on approximately 2,500 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
Usage
This template wraps {{Include-USGov}} and takes any parameter that {{citation}} does. It accepts |article=
as an alias for |title=
. It can also produce a standalone message with no arguments.
For example:
{{US government sources}}
→ This article incorporates public domain material from websites or documents of the United States Government.
{{US government sources|title=Document Title}}
→ This article incorporates public domain material from Document Title. United States Government.
{{US government sources|title=Document Title|url=https://www.example.gov}}
→ This article incorporates public domain material from Document Title. United States Government.
{{US government sources|article=Document Title|url=https://www.example.gov}}
→ This article incorporates public domain material from Document Title. United States Government.
{{US government sources|title=Document Title|url=https://www.example.gov|first=John Q.|last=Public|access-date=31 December 2024}}
→ This article incorporates public domain material from Public, John Q. Document Title. United States Government. Retrieved 31 December 2024.
The template can also take |agency=
to specify which Federal agency published the work:
{{US government sources|url=https://www.agency.gov|title=Document Title|agency=Government agency}}
→ This article incorporates public domain material from Document Title. Government agency.
Categorization
This template will categorize articles that include it into Category:Wikipedia articles incorporating text from public domain works of the United States Government.
Note
Wherever possible, use a more specific template, from the list below: