Difference between revisions of "Template:Bible ref"
(Make code smaller) |
(change link to ESV version as the default) |
||
| (14 intermediate revisions by 6 users not shown) | |||
| Line 1: | Line 1: | ||
| − | <includeonly>[http://www.biblegateway.com/cgi-bin/bible?language={{{language|english}}}&passage={{{book}}}+{{{chap}}}{{#if:{{{verses|}}}|%3A{{{verses}}}{{{version| | + | <includeonly>[http://www.biblegateway.com/cgi-bin/bible?language={{{language|english}}}&passage={{{1|{{{book}}}}}}+{{{2|{{{chap}}}}}}{{#if:{{{3|{{{verses|}}}}}}|%3A{{{3|{{{verses}}}}}}|}}&version={{#switch: {{{1|{{{book}}}}}}|Tobit|Judith|1Maccabees|1_Maccabees|2Maccabees|2_Maccabees|Wisdom|Sirach|Baruch=63|{{{version|ESV}}}}} {{{1|{{{book}}}}}} {{{2|{{{chap}}}}}}{{#if:{{{3|{{{verses|}}}}}}|<nowiki>:</nowiki>{{{3|{{{verses}}}}}}|}}] {{#switch: {{{1|{{{book}}}}}}|Tobit|Judith|1Maccabees|1_Maccabees|2Maccabees|2_Maccabees|Wisdom|Sirach|Baruch=(Douay-Rheims)|{{#if:{{{version|}}}|({{{version}}})|}}}}</includeonly><noinclude> |
{{TemplateDoc|pages=Articles (mainly)|purpose=Linking to a Bible passage|cat=}} | {{TemplateDoc|pages=Articles (mainly)|purpose=Linking to a Bible passage|cat=}} | ||
{{Parms| | {{Parms| | ||
{{Parm|language|English, etc.|no|Defaults to English}} | {{Parm|language|English, etc.|no|Defaults to English}} | ||
| − | {{Parm|book|Bible book|yes| | + | {{Parm|1 ''or'' book|Bible book|yes|See note A about books with spaces; see also note D}} |
| − | {{Parm|chap|Chapter(s)|yes|}} | + | {{Parm|2 ''or'' chap|Chapter(s)|yes|See note D}} |
| − | {{Parm|verses| | + | {{Parm|3 ''or'' verses|Verse(s)|no|Defaults to entire chapter(s). See note D}} |
| − | {{Parm|version|Translation|no|Defaults to | + | {{Parm|version|Translation|no|Defaults to ESV (see note B)}} |
}} | }} | ||
This template sets up the external link to [http://www.biblegateway.com/ BibleGateway] for providing a chapter or chapter and verse reference for any passage in the Bible, in any version in any language. | This template sets up the external link to [http://www.biblegateway.com/ BibleGateway] for providing a chapter or chapter and verse reference for any passage in the Bible, in any version in any language. | ||
| − | ''' | + | '''Examples: |
| + | * {{tt|<nowiki>{{Bible ref|book=1Corinthians|chap=1|verses=1-18|version=ASV}}</nowiki>'''}} | ||
| + | * {{tt|<nowiki>{{Bible ref|1Corinthians|1|1-18|version=ASV}}</nowiki>}} | ||
'''NOTE A:''' Books which have spaces in the name (such as Song of Solomon or I & II Corinthians) must be solid set (spaces omitted), or with the spaces replaced with underscores (_). (i.e. ICorinthians and 1Corinthians and I_Corinthians and 1_Corinthians all work, but (I Corinthians) does not.) | '''NOTE A:''' Books which have spaces in the name (such as Song of Solomon or I & II Corinthians) must be solid set (spaces omitted), or with the spaces replaced with underscores (_). (i.e. ICorinthians and 1Corinthians and I_Corinthians and 1_Corinthians all work, but (I Corinthians) does not.) | ||
| − | '''NOTE B:''' If the version is not supplied, the link will be to the | + | '''NOTE B:''' If the version is not supplied, the link will be to the ESV, but the version will not be shown. To show that the link is to the ESV, supply ESV to the ''version'' parameter. |
| − | '''NOTE C:''' This template does ''not'' "substitute" well. It tends to leave the "if" statements in place. | + | : '''NOTE B1:''': If any of seven deuterocanonical books (Tobit, Judith, 1 or 2 Maccabees, Wisdom, Sirach, or Baruch, aka the classic "Apocrypha") are specified, then the version used will be the Douay-Rheims 1899 American edition, the only version at BibleGateway that contains these books. "Douay-Rheims" will appear in parentheses next to the reference. |
| + | |||
| + | '''NOTE C:''' This template does ''not'' "substitute" well. It tends to leave the "if" statements in place. | ||
| + | |||
| + | '''NOTE D:''' If both un-named (numbered) parameters and equivalent named parameters are used, the named parameter will take precedence over the un-named parameter. | ||
'''Alternative:''' | '''Alternative:''' | ||
For framed quotes, use {{tl|Bible quote}}.</noinclude> | For framed quotes, use {{tl|Bible quote}}.</noinclude> | ||
Latest revision as of 18:53, March 17, 2022
| Template: Bible ref | |
|---|---|
| Use on | Articles (mainly) |
| Use for | Linking to a Bible passage |
| Category template applies to page | (none) |
| Template Parameters (See using templates). | |||
|---|---|---|---|
| Name | Purpose | Required? | Comment |
| language | English, etc. | no | Defaults to English |
| 1 or book | Bible book | yes | See note A about books with spaces; see also note D |
| 2 or chap | Chapter(s) | yes | See note D |
| 3 or verses | Verse(s) | no | Defaults to entire chapter(s). See note D |
| version | Translation | no | Defaults to ESV (see note B) |
This template sets up the external link to BibleGateway for providing a chapter or chapter and verse reference for any passage in the Bible, in any version in any language.
Examples:
- {{Bible ref|book=1Corinthians|chap=1|verses=1-18|version=ASV}}
- {{Bible ref|1Corinthians|1|1-18|version=ASV}}
NOTE A: Books which have spaces in the name (such as Song of Solomon or I & II Corinthians) must be solid set (spaces omitted), or with the spaces replaced with underscores (_). (i.e. ICorinthians and 1Corinthians and I_Corinthians and 1_Corinthians all work, but (I Corinthians) does not.)
NOTE B: If the version is not supplied, the link will be to the ESV, but the version will not be shown. To show that the link is to the ESV, supply ESV to the version parameter.
- NOTE B1:: If any of seven deuterocanonical books (Tobit, Judith, 1 or 2 Maccabees, Wisdom, Sirach, or Baruch, aka the classic "Apocrypha") are specified, then the version used will be the Douay-Rheims 1899 American edition, the only version at BibleGateway that contains these books. "Douay-Rheims" will appear in parentheses next to the reference.
NOTE C: This template does not "substitute" well. It tends to leave the "if" statements in place.
NOTE D: If both un-named (numbered) parameters and equivalent named parameters are used, the named parameter will take precedence over the un-named parameter.
Alternative:
For framed quotes, use {{Bible quote}}.