Difference between revisions of "Template:Biographical Directory of Congress/doc"

From blackwiki
Jump to navigation Jump to search
imported>Majora4
m (Reverted good faith edits by 76.167.242.132 (talk): Reverting test edit. (TW))
imported>Zyxw
(update documentation and examples, add TemplateData)
Line 1: Line 1:
{{documentation subpage}}
+
<!-- Categories go at the bottom of this page and interwikis go in Wikidata. -->
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->
+
'''<nowiki>{{Biographical Directory of Congress}}</nowiki>''' (and its shorter redirect '''<nowiki>{{CongBio}}</nowiki>''') displays an external link to a specified article at the [[Biographical Directory of the United States Congress]] website ([http://bioguide.congress.gov bioguide.congress.gov]).
==How to use==
 
  
'''<nowiki>{{CongBio}}</nowiki>''' and '''<nowiki>{{Biographical Directory of Congress}}</nowiki>''' allow linking to the Bioguide, using parameter of subject.
+
== Usage ==
 +
In the following, <code><nowiki>{{</nowiki>Biographical Directory of Congress</code> can be used instead of <code><nowiki>{{</nowiki>CongBio</code>.
  
===Parameters===
+
=== Unnamed parameters ===
* {{{1}}} (required) = index
+
* <code><nowiki>{{</nowiki>CongBio|''ID''<nowiki>}}</nowiki></code>
* {{{name}}} (optional) = Name, which should only be necessary if <nowiki>{{PAGENAME}}</nowiki> has a disambiguating name, such as "… (politician)"
+
* <code><nowiki>{{</nowiki>CongBio|''ID''|''NAME''<nowiki>}}</nowiki></code>
* {{{findagrave}}} (optional) = index at Findagrave.com
 
* {{{date}}} (optional) = Date retrieved
 
* {{{inline}}} (optional) = yes, 1, or anything
 
  
==Example==
+
=== Named parameters ===
[[Henry Clay]]'s biography is at http://bioguide.congress.gov/scripts/biodisplay.pl?index=c000482,<br>
+
* <code><nowiki>{{</nowiki>CongBio|id=''ID''<nowiki>}}</nowiki></code>
So <tt><nowiki>{{CongBio|c000482|findagrave=203|date=January 26, 2010}}</nowiki></tt> will return an external link to that biography:<br>
+
* <code><nowiki>{{</nowiki>CongBio|id=''ID''|name=''NAME''<nowiki>}}</nowiki></code>
{{CongBio|C000482|Henry Clay|findagrave=203|date=January 26, 2010}}
+
* <code><nowiki>{{</nowiki>CongBio|id=''ID''|name=''NAME''|date=''DATE''<nowiki>}}</nowiki></code>
 +
* <code><nowiki>{{</nowiki>CongBio|id=''ID''|name=''NAME''|date=''DATE''|inline=''YES''<nowiki>}}</nowiki></code>
 +
* <code><nowiki>{{</nowiki>CongBio|id=''ID''|name=''NAME''|date=''DATE''|findagrave=''GRID''<nowiki>}}</nowiki></code>
  
<tt><nowiki>{{Biographical Directory of Congress|c000482|findagrave=203|date=January 26, 2010}}</nowiki></tt> works in the same way:<br>
+
== TemplateData ==
{{Biographical Directory of Congress|c000482|findagrave=203|date=January 26, 2010}}
+
{{TemplateDataHeader}}
 +
<templatedata>{
 +
"description": "This template displays an external link to a specified article at the Biographical Directory of the United States Congress website (bioguide.congress.gov).",
 +
"params": {
 +
  "1": {
 +
    "label": "ID",
 +
    "aliases": ["id"],
 +
    "description": "ID portion of the URL. Example: C000482 is the ID portion of http://bioguide.congress.gov/scripts/biodisplay.pl?index=C000482",
 +
    "type": "string",
 +
    "default": "",
 +
    "required": true
 +
  },
 +
  "2": {
 +
    "label": "Name",
 +
    "aliases": ["name"],
 +
    "description": "Name of subject. If not given it defaults to the Wikipedia article name, without any disambiguation such as (politician).",
 +
    "type": "string",
 +
    "default": "{{PAGENAME}}",
 +
    "required": false
 +
  },
 +
  "date": {
 +
    "label": "Date",
 +
    "description": "Date the web page was accessed/retrieved.",
 +
    "type": "string",
 +
    "required": false
 +
  },
 +
  "inline": {
 +
    "label": "Inline",
 +
    "description": "If this parameter is assigned a value (yes, 1, or anything) then the leading asterisk/bullet is not displayed.",
 +
    "type": "string",
 +
    "required": false
 +
  },
 +
  "findagrave": {
 +
    "label": "Findagrave",
 +
    "description": "If this parameter is assigned a value, then the template will display an external link to the associated page at the Find a Grave website.",
 +
    "type": "string",
 +
    "required": false
 +
  }
 +
}}</templatedata>
  
To use the template without the *, type <tt><nowiki>{{CongBio|c000482|inline=1|date=January 25, 2010}}</nowiki></tt> or  <tt><nowiki>{{Biographical Directory of Congress|c000482|inline=1|date=January 25, 2010}}</nowiki></tt><br>
+
== Examples ==
{{CongBio|C000482|Henry Clay|inline=1|date=January 26, 2010}}
+
In the following, <code><nowiki>{{</nowiki>Biographical Directory of Congress</code> can be used instead of <code><nowiki>{{</nowiki>CongBio</code>.
 +
 
 +
These examples all link to [[Henry Clay]]'s biography, which is located at:
 +
* http://bioguide.congress.gov/scripts/biodisplay.pl?index=C000482
 +
 
 +
=== Unnamed parameters ===
 +
''Usage:'' <code><nowiki>{{</nowiki>CongBio | C000482 | Henry Clay }}</code>
 +
 
 +
''Output:'' {{CongBio | C000482 | Henry Clay }}
 +
 
 +
=== Named parameters ===
 +
''Usage'': <code><nowiki>{{</nowiki>CongBio |id= C000482 |name= Henry Clay }}</code>
 +
 
 +
''Output'': {{CongBio| id= C000482 | name= Henry Clay }}
 +
 
 +
=== Date ===
 +
''Usage'': <code><nowiki>{{</nowiki>CongBio |id= C000482 |name= Henry Clay |date= January 26, 2010 }}</code>
 +
 
 +
''Output'': {{CongBio |id= C000482 |name= Henry Clay |date= January 26, 2010 }}
 +
 
 +
=== Inline ===
 +
''Usage'': <code><nowiki>{{</nowiki>CongBio |id= C000482 |name= Henry Clay |inline= yes }}</code>
 +
 
 +
''Output'': {{CongBio |id= C000482 |name= Henry Clay |inline= yes }}
 +
 
 +
=== Findagrave ===
 +
''Usage'': <code><nowiki>{{</nowiki>CongBio |id= C000482 |name= Henry Clay |findagrave= 203 }}</code>
 +
 
 +
''Output'': {{CongBio |id= C000482 |name= Henry Clay |findagrave= 203 }}
 +
 
 +
=== Findagrave and Date ===
 +
''Usage'': <code><nowiki>{{</nowiki>CongBio |id= C000482 |name= Henry Clay |findagrave= 203 |date= January 26, 2010 }}</code>
 +
 
 +
''Output'': {{CongBio |id= C000482 |name= Henry Clay |findagrave= 203 |date= January 26, 2010 }}
  
 
==See also==
 
==See also==
*{{tl|CongLinks}} - For members from 1991–present.  It has BioGuide, Washington Post voting record, Open Secrets, FEC reports, Vote Smart, On The issues, Legistorm, StateSurge GovTrack and FindAGrave. '''This is preferred.'''
+
* {{tl|CongLinks}} - For members from 1991–present.  It has BioGuide, Washington Post voting record, Open Secrets, FEC reports, Vote Smart, On The issues, Legistorm, StateSurge GovTrack and FindAGrave. '''This is preferred.'''
*{{tl|Bioguide}} looks like this: {{Bioguide}}
+
* {{tl|Bioguide}} looks like this: {{Bioguide}}
*{{tl|Cleanup Congress Bio}} puts articles in the category, [[:Category:Biographical Directory of the United States Congress cleanup]].
+
* {{tl|Cleanup Congress Bio}} puts articles in the category, [[:Category:Biographical Directory of the United States Congress cleanup]].
*[[Biographical Directory of the United States Congress]]
+
* [[Biographical Directory of the United States Congress]]
 
* [[Wikipedia:WikiProject U.S. Congress/Bioguide]], a subpage of '''Project Congress''', tracks how well information is imported from the Bioguide.
 
* [[Wikipedia:WikiProject U.S. Congress/Bioguide]], a subpage of '''Project Congress''', tracks how well information is imported from the Bioguide.
 
 
<includeonly>
 
<includeonly>
<!-- ADD CATEGORIES BELOW THIS LINE -->
+
<!-- Categories go here, and interwikis go in Wikidata -->
 
[[Category:People and person external link templates]]
 
[[Category:People and person external link templates]]
 
[[Category:U.S. Congress external link templates]]
 
[[Category:U.S. Congress external link templates]]
 
[[Category:United States government attribution templates]]
 
[[Category:United States government attribution templates]]
 
<!-- ADD INTERWIKIS BELOW THIS LINE -->
 
[[ko:틀:CongBio]]
 
[[ja:Template:CongBio]]
 
[[no:Mal:KongressBio]]
 
 
</includeonly>
 
</includeonly>

Revision as of 11:16, 18 April 2014

{{Biographical Directory of Congress}} (and its shorter redirect {{CongBio}}) displays an external link to a specified article at the Biographical Directory of the United States Congress website (bioguide.congress.gov).

Usage

In the following, {{Biographical Directory of Congress can be used instead of {{CongBio.

Unnamed parameters

  • {{CongBio|ID}}
  • {{CongBio|ID|NAME}}

Named parameters

  • {{CongBio|id=ID}}
  • {{CongBio|id=ID|name=NAME}}
  • {{CongBio|id=ID|name=NAME|date=DATE}}
  • {{CongBio|id=ID|name=NAME|date=DATE|inline=YES}}
  • {{CongBio|id=ID|name=NAME|date=DATE|findagrave=GRID}}

TemplateData

This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.

TemplateData for Biographical Directory of Congress

This template displays an external link to a specified article at the Biographical Directory of the United States Congress website (bioguide.congress.gov).

Template parameters

ParameterDescriptionTypeStatus
ID1 id

ID portion of the URL. Example: C000482 is the ID portion of http://bioguide.congress.gov/scripts/biodisplay.pl?index=C000482

Default
Stringrequired
Name2 name

Name of subject. If not given it defaults to the Wikipedia article name, without any disambiguation such as (politician).

Default
{{PAGENAME}}
Stringoptional
Datedate

Date the web page was accessed/retrieved.

Stringoptional
Inlineinline

If this parameter is assigned a value (yes, 1, or anything) then the leading asterisk/bullet is not displayed.

Stringoptional
Findagravefindagrave

If this parameter is assigned a value, then the template will display an external link to the associated page at the Find a Grave website.

Stringoptional

Examples

In the following, {{Biographical Directory of Congress can be used instead of {{CongBio.

These examples all link to Henry Clay's biography, which is located at:

Unnamed parameters

Usage: {{CongBio | C000482 | Henry Clay }}

Output:

  • United States Congress. "Henry Clay (id: C000482)". Biographical Directory of the United States Congress.

Named parameters

Usage: {{CongBio |id= C000482 |name= Henry Clay }}

Output:

Date

Usage: {{CongBio |id= C000482 |name= Henry Clay |date= January 26, 2010 }}

Output:

Inline

Usage: {{CongBio |id= C000482 |name= Henry Clay |inline= yes }}

Output: United States Congress. "Henry Clay (id: C000482)". Biographical Directory of the United States Congress.

Findagrave

Usage: {{CongBio |id= C000482 |name= Henry Clay |findagrave= 203 }}

Output:

Findagrave and Date

Usage: {{CongBio |id= C000482 |name= Henry Clay |findagrave= 203 |date= January 26, 2010 }}

Output:

See also