Help:Congresspedia templates and extensions

From SourceWatch
Jump to navigation Jump to search
The Congresspedia project on SourceWatch utilizes a variety of templates and extensions to automate certain functions and displays. This help page is a guide for using them. For templates used on SourceWatch, but not the Congresspedia project, see this page.

Related campaigns

Congresspedia now allows links to issue campaigns, such as "action centers" or other sites maintained by advocacy organizations. For instructions on adding these links, see this page.

Legislative vote boxes

Congresspedia uses extensions to create vote boxes for all roll call votes discussed on its' legislation pages. A different process must be followed, however, for votes in the 109th/110th Congresses and votes prior to the 109th Congress.

109th and 110th Congress votes

For 109th and 110th Congress votes, the extensions take information regarding a particular vote from OpenCongress, and display it in a colorful, informative display box. The following are examples of the text necessary to generate House and Senate vote boxes:

<USvoteinfo year="2007" chamber="senate" rollcall="126" />

<USvoteinfo year="2007" chamber="house" rollcall="126" />

Taking a look at this example, the text "USvoteinfo" represents the standard opening text for all vote extensions. "year="2007"" represents the year in which the vote took place. "chamber="house"" indicates that the vote occurred in the House, while "chamber="senate"" indicates that the vote occurred in the Senate. "rollcall="153"" denotes the official roll call number of the vote.

Once the above text is entered, the vote boxes should appear in this form:

<USvoteinfo year="2007" chamber="senate" rollcall="126" />

<USvoteinfo year="2007" chamber="house" rollcall="126" />

Votes prior to the 109th Congress

For all bills prior to the 109th Congress (before OpenCongress was launched), a separate process must be followed in order to generate vote boxes for roll call votes. Congresspedia editors have created separate templates for both House and Senate votes, and the following are instructions for entering the text necessary to generate them:

The House and Senate vote templates use the same inputs and you will need to collect the following pieces of information for them to work properly (instructions on how to input these pieces of information is below this chart):

Inputs for the House and Senate record vote templates

"Vote name": The name of whatever vote you're trying to record. The official name is best, but a common description of the vote works, too. Ex: "Authorization for Use of Military Force Against Iraq"

  • Note: You may wish to include a link to the page on the Library of Congress' THOMAS system, the Washington Post's Congressional Votes Database or another legislative information database (example: Authorization for Use of Military Force Against Iraq). If so, make sure to find a permanent link that will always lead to that page. Sometimes websites give you a link that expires or only works for you. Try opening up the link in another browser window to make sure it works there, too.
"Date": The date of the vote, formatted in AP style. Ex: "September 8, 2006"
"Vote result": State whether the vote passed or failed and give the count, biggest number first. Ex: "Passed, 80-20"
"Demvote": The Democratic vote. Put the biggest number first and indicate what that represents. Ex: "44-2 in favor" or "44-2 opposed"
"GOPvote": The Republican vote, formatted the same as the Democratic vote.
"Indvote": The Independent vote, formatted the same as the others. If this applies to only one vote, format it like this: "1 in favor".
"Congressnum": This is the number of the Congress. It is important use only a number here, with no spaces or other characters. Examples using recent congresses inclue:
  • "109" - The 109th Congress, 2005-2006.
  • "108" - The 108th Congress, 2003-2004.
  • "107" - The 107th Congress, 2001-2002.
  • "106" - The 106th Congress, 1999-2000 (and so forth).
"Session": This is the session, number one or two, of the Congress. The first session is the first year of the Congress, the second is the second year. Use only the numbers "1" or "2".
"Votenum": This is the official roll call vote number. Use only a number, with no spaces or other characters.

Once you've collected all these pieces of information, you can plug them into the template call. Examples for both the House and Senate templates are below.

Input and Output for the Senate Record Vote Template
What you put in What you get
{{Senate record vote
| Vote name=[http://thomas.loc.gov/cgi-bin/bdquery/z?d107:h.j.res.114: Authorization for Use of Military Force]
| Date=October 11, 2002
| Vote result=Passed, 77-23
| Demvote=29-21 in favor
| GOPvote=48-1 in favor
| Indvote=1 opposed
| Congressnum=107
| Session=2
| Votenum=237}}

October 11, 2002
Passed, 77-23, view details
Dem: 29-21 in favor, GOP: 48-1 in favor, Ind: 1 opposed


Input and Output for the House Record Vote Template
What you put in What you get
{{House record vote
| Vote name=[http://thomas.loc.gov/cgi-bin/bdquery/z?d107:h.j.res.114: Authorization for Use of Military Force Against Iraq (final vote)]
| Date=October 10, 2002
| Vote result=Passed, 296-133
| Demvote=126-81 opposed
| GOPvote=215-6 in favor
| Indvote=1 opposed
| Votenum=455
| Congressnum=107
| Sessionnum=2}}

October 10, 2002
Passed, 296-133, view details
Dem: 126-81 opposed, GOP: 215-6 in favor, Ind: 1 opposed

An additional but completely option field to put in is "align". This will tell the template to float to the right or left of any text that comes after it on the page. Simply insert "Align=right" or "Align=left" to make it float. Below is an example of "Align=right".

Input and Output for the House Record Vote Template
What you put in
{{House record vote
| Vote name=[http://thomas.loc.gov/cgi-bin/bdquery/z?d107:h.j.res.114: Authorization for Use of Military Force Against Iraq (final vote)]
| Date=October 10, 2002
| Vote result=Passed, 296-133
| Demvote=126-81 opposed
| GOPvote=215-6 in favor
| Indvote=1 opposed
| Votenum=455
| Congressnum=107
| Sessionnum=2
| Align=right}}


What you get:

October 11, 2002
Passed, 77-23, view details
Dem: 29-21 in favor, GOP: 48-1 in favor, Ind: 1 opposed

Links to the templates:



Bill info extensions

Congresspedia uses an extension to create bill info boxes for all bills (both introduced or considered) noted on legislation pages. The boxes provide real time information on a particular bill, including its sponsor, committee of jurisdiction, and current status in the Congress. The following is an example of the text necessary to generate House and Senate info boxes:

<USbillinfo congress="110" bill="H.R.985" />

<USbillinfo congress="110" bill="S.1" />

Taking a look at these example, "USbillinfo" is the standard opening text for the extension. "congress="110"" notes the number of the Congress for which the bills were introduced. "bill="H.R.985"" and "bill="S.1."" denote the official bill numbers.

Once the respective extensions are entered, the bill info boxes should appear in this form:

House <USbillinfo congress="110" bill="H.R.1348" />


Senate <USbillinfo congress="110" bill="S.1" />