Difference between revisions of "Template:Include-USGov/testcases"
imported>Hike395 (test auto wiki linking) |
imported>Hike395 (add source tests) |
||
| Line 9: | Line 9: | ||
* author (optional) - author of reference | * author (optional) - author of reference | ||
* accessdate (optional) - date page last checked | * accessdate (optional) - date page last checked | ||
| + | * source (optional) - free field at end at shuts off most other arguments: useful for inline use of {{tl|cite web}} | ||
==Tests== | ==Tests== | ||
| Line 63: | Line 64: | ||
<nowiki>|article=Reference document</nowiki><br/> | <nowiki>|article=Reference document</nowiki><br/> | ||
<nowiki>|url=http://www.agency.gov/doc.html</nowiki><br/> | <nowiki>|url=http://www.agency.gov/doc.html</nowiki><br/> | ||
| − | <nowiki>|author=John Q. Public}}</nowiki | + | <nowiki>|author=John Q. Public}}</nowiki> |
| {{Include-USGov|agency=United States Department|article=Reference document|url=http://www.agency.gov/doc.html|author=John Q. Public}} | | {{Include-USGov|agency=United States Department|article=Reference document|url=http://www.agency.gov/doc.html|author=John Q. Public}} | ||
| {{Include-USGov/sandbox|agency=United States Department|article=Reference document|url=http://www.agency.gov/doc.html|author=John Q. Public}} | | {{Include-USGov/sandbox|agency=United States Department|article=Reference document|url=http://www.agency.gov/doc.html|author=John Q. Public}} | ||
| Line 84: | Line 85: | ||
<nowiki>|author=John Q. Public</nowiki><br/> | <nowiki>|author=John Q. Public</nowiki><br/> | ||
<nowiki>|accessdate=2008-08-08</nowiki><br/> | <nowiki>|accessdate=2008-08-08</nowiki><br/> | ||
| − | <nowiki>|comment=comment can have [[link]]s}}</nowiki | + | <nowiki>|comment=comment can have [[link]]s}}</nowiki> |
| {{Include-USGov|agency=United States Department|policy=http://www.agency.gov/policy.html|article=Reference document|url=http://www.agency.gov/doc.html|author=John Q. Public|accessdate=2008-08-08|comment=comment can have [[link]]s}} | | {{Include-USGov|agency=United States Department|policy=http://www.agency.gov/policy.html|article=Reference document|url=http://www.agency.gov/doc.html|author=John Q. Public|accessdate=2008-08-08|comment=comment can have [[link]]s}} | ||
| {{Include-USGov/sandbox|agency=United States Department|policy=http://www.agency.gov/policy.html|article=Reference document|url=http://www.agency.gov/doc.html|author=John Q. Public|accessdate=2008-08-08|comment=comment can have [[link]]s}} | | {{Include-USGov/sandbox|agency=United States Department|policy=http://www.agency.gov/policy.html|article=Reference document|url=http://www.agency.gov/doc.html|author=John Q. Public|accessdate=2008-08-08|comment=comment can have [[link]]s}} | ||
| All parameters can work together | | All parameters can work together | ||
| + | |- | ||
| + | |<nowiki>{{Include-USGov</nowiki><br/> | ||
| + | <nowiki>|agency=United States government</nowiki><br/> | ||
| + | <nowiki>|policy=http://www.whitehouse.gov</nowiki><br/> | ||
| + | <nowiki>|author=Arglebargle IV</nowiki><br/> | ||
| + | <nowiki>|article=On Boggies</nowiki><br/> | ||
| + | <nowiki>|accessdate=Third Age</nowiki><br/> | ||
| + | <nowiki>|source=Use cite template here}}</nowiki> | ||
| + | | {{Include-USGov|agency=United States government|policy=http://www.whitehouse.gov|author=Arglebargle IV|article=On Boggies|accessdate=Third Age|source=Use cite template here}} | ||
| + | | {{Include-USGov/sandbox|agency=United States government|policy=http://www.whitehouse.gov|author=Arglebargle IV|article=On Boggies|accessdate=Third Age|source=Use cite template here}} | ||
| + | | Source parameter shuts down most arguments, leaves free field at end for citation template | ||
| + | |- | ||
| + | |<nowiki>{{Include-USGov</nowiki><br/> | ||
| + | <nowiki>|agency=United States Department</nowiki><br/> | ||
| + | <nowiki>|source={{cite book|first=John |last=Smith |title=Battle of Hastings}} }}</nowiki> | ||
| + | |{{Include-USGov|agency=United States Department|source={{cite book|first=John |last=Smith |title=Battle of Hastings}} }} | ||
| + | |{{Include-USGov/sandbox|agency=United States Department|source={{cite book|first=John |last=Smith |title=Battle of Hastings}} }} | ||
| + | |Example of source usage | ||
| + | |- | ||
| + | |<nowiki>{{Include-USGov</nowiki><br/> | ||
| + | <nowiki>|agency=United States Department</nowiki><br/> | ||
| + | <nowiki>|article=Reference document</nowiki><br/> | ||
| + | <nowiki>|url=http://www.agency.gov/doc.html</nowiki><br/> | ||
| + | <nowiki>|source= }}</nowiki> | ||
| + | |{{Include-USGov|agency=United States Department|article=Reference document|url=http://www.agency.gov/doc.html|source= }} | ||
| + | |{{Include-USGov/sandbox|agency=United States Department|article=Reference document|url=http://www.agency.gov/doc.html|source= }} | ||
| + | | Blank source leaves other parameters active | ||
|} | |} | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
Revision as of 09:33, 30 December 2011
| 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 |
Agency name becomes external link | ||
| {{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 |