Template:Include-USGov/testcases
| This is the template test cases page for the sandbox of Template:Include-USGov. Script error: No such module "Purge". to update the examples. If there are many examples of a complicated template, later ones may break due to limits in MediaWiki, see the HTML comment "NewPP limit report" in the rendered page. You can also use Special:ExpandTemplates to examine the results of template uses. You can test how this page looks in the different skins with these links: |
- agency (required) - name of agency (or reference source) that produced material
- url (optional) - URL of reference
- policy (optional) - URL of re-use policy of agency or reference source
- comment (optional) - free field that produces parenthesized comment at end
- article (optional) - the title of the reference
- author (optional) - author of reference
- accessdate (optional) - date page last checked
- source (optional) - free field at end at shuts off most other arguments: useful for inline use of {{cite web}}
Tests
| Code | Working template | Sandbox version | Comments |
|---|---|---|---|
| {{Include-USGov |agency=United States Department}} |
Minimal usage: templates that call this one should pass in optional arguments. | ||
| {{Include-USGov |agency=United States Department |
Replace internal wikilink about generic re-use to specific agency policy | ||
| {{Include-USGov |agency=United States government |
comment is a free field that produces a parenthesized comment at end, agency should auto-wikilink | ||
| {{Include-USGov |agency=United States Department |
Url without agency is just a bare link | ||
| {{Include-USGov |agency=United States Department |
Url with comment should still work | ||
| {{Include-USGov |agency=United States Department |
With article argument, template refers to specific document | ||
| {{Include-USGov |agency=United States Department |
With article argument, url becomes external link to specific document | ||
| {{Include-USGov |agency=United States Department |
Author can be added for use in inline citation | ||
| {{Include-USGov |agency=United States Department |
Accessdate can be added, also | ||
| {{Include-USGov |agency=United States Department |
All parameters can work together | ||
| {{Include-USGov |agency=United States government |
Source parameter shuts down most arguments, leaves free field at end for citation template | ||
| {{Include-USGov |agency=United States Department |
Example of source usage | ||
| {{Include-USGov |agency=United States Department |
Blank source leaves other parameters active |
Source parameter tests
Test cases for using |source= parameter and {{cite web}} embedded content:
| Code | Working template | Sandbox version | Comments |
|---|---|---|---|
| {{Include-USGov |agency=United States Department
}} |
|url= (help)
|
Example of source usage from above table, changed from {{cite book}} to {{cite web}} | |
| {{Include-USGov |agency=United States Department
}} |
|url= (help)
|
|url= (help)
|
Example of source usage with |date= parameter in {{cite web}} string
|
| {{Include-USGov |agency=United States Department
}} |
|url= (help); |access-date= requires |url= (help)
|
|url= (help); |access-date= requires |url= (help)
|
Example of source usage with |accessdate= parameter in {{cite web}} string
|