Difference between revisions of "Template:LDS/doc"

From blackwiki
Jump to navigation Jump to search
imported>Biggins
m (Clean up)
imported>Biggins
(Clarified intro, added more examples)
Line 3: Line 3:
 
This template makes it easy to create links to [[Latter Day Saint movement]] scriptures, including to specific chapters/sections and verses inside those texts. By default, the template links to the texts as stored on [[Wikisource:|Wikisource]], but adding the optional "website=lds" parameter will create links to the LDS Church's website instead.
 
This template makes it easy to create links to [[Latter Day Saint movement]] scriptures, including to specific chapters/sections and verses inside those texts. By default, the template links to the texts as stored on [[Wikisource:|Wikisource]], but adding the optional "website=lds" parameter will create links to the LDS Church's website instead.
  
<pre>{{LDS|display text|book name|chapter|verse|end verse|footnote (deprecated)|cross ref flag (deprecated)|nonconsecutive end verse flag|website}}</pre>
+
The most common usage for the template, citing to a single scripture verse, uses four parameters: {{tlx|LDS|display text|book name|chapter|verse}}
  
:'''Note:''' This template does not use parameter names (with the exception of the "website" parameter for specifying the website that hosts the text); parameter names below are only for documentation purposes. Parameters must be passed in the order given.
+
For example, {{tlx|LDS|Eth.|Ether|12|4}} renders as {{LDS|Eth.|Ether|12|4}}.
 +
 
 +
Additional parameters can be provided to cite to a range of verses and/or to the LDS Church website instead of Wikisource, as explained below.
  
 
== Basic usage ==
 
== Basic usage ==
 +
 
{{tlx|LDS|Eth.|Ether|12|4}}
 
{{tlx|LDS|Eth.|Ether|12|4}}
  
Line 14: Line 17:
 
# Jumps to verse on page
 
# Jumps to verse on page
 
# Displays in the article text as: {{LDS|Eth.|Ether|12|4}}
 
# Displays in the article text as: {{LDS|Eth.|Ether|12|4}}
 +
 +
===Note===
 +
 +
The first two parameters ("display text" and "book name") in many cases may be the same or similar, but they should always both be provided. For example, to produce {{LDS|Alma|alma|7|11}} you should type <code><nowiki>{{LDS|Alma|</nowiki>'''alma'''<nowiki>|7|11}}</nowiki></code>. Forgetting to provide the book name when it is the same or similar to the display text is the most common error when using this template.
  
 
== Template Data ==
 
== Template Data ==
Line 20: Line 27:
 
"params": {
 
"params": {
 
"1": {
 
"1": {
"aliases": [
 
"display",
 
"display name"
 
],
 
 
"label": "display text",
 
"label": "display text",
 
"description": "text to display to user before the chapter/verse numbers; usually the full book name (\"First Nephi\") or an abbreviation (\"1 Ne.\"), but it could be anything (e.g., \"My favorite book of scripture\") or even left blank (useful if citing to multiple different chapters of the same book and you don't want to repeat the book name)",
 
"description": "text to display to user before the chapter/verse numbers; usually the full book name (\"First Nephi\") or an abbreviation (\"1 Ne.\"), but it could be anything (e.g., \"My favorite book of scripture\") or even left blank (useful if citing to multiple different chapters of the same book and you don't want to repeat the book name)",
 
"type": "string",
 
"type": "string",
"example": "1. Ne.",
+
"example": "1 Ne.",
 
"default": "LDS Standard Works",
 
"default": "LDS Standard Works",
 
"suggested": true
 
"suggested": true
 
},
 
},
 
"2": {
 
"2": {
"aliases": [
 
"book"
 
],
 
 
"label": "book name",
 
"label": "book name",
"description": "name of book (or abbreviation of book used by LDS Church website)",
+
"description": "name of book (or abbreviation of book used by LDS Church website); this parameter is not case sensitive (e.g., 'alma' is the same as 'Alma')",
 
"type": "string",
 
"type": "string",
 
"example": "1-ne",
 
"example": "1-ne",
Line 42: Line 42:
 
},
 
},
 
"3": {
 
"3": {
"aliases": [
 
"chap",
 
"section"
 
],
 
 
"label": "chapter",
 
"label": "chapter",
 
"description": "chapter (or section) of scripture being cited\t",
 
"description": "chapter (or section) of scripture being cited\t",
Line 52: Line 48:
 
},
 
},
 
"4": {
 
"4": {
"aliases": [
 
"initial verse"
 
],
 
 
"label": "verse",
 
"label": "verse",
 
"description": "verse of scripture being cited\t",
 
"description": "verse of scripture being cited\t",
Line 61: Line 54:
 
},
 
},
 
"5": {
 
"5": {
"aliases": [
 
"end verses"
 
],
 
 
"label": "end verse",
 
"label": "end verse",
 
"description": "end verse(s) of a series of cited verses, such as the 5 in \"John 3:4–5\" or the \"–5, 16\" in \"John 3:4–5, 16\". An en dash is automatically added between this parameter and the verse# parameter unless the end verse flag has a value (see the end verse flag parameter for more info about that usage)",
 
"description": "end verse(s) of a series of cited verses, such as the 5 in \"John 3:4–5\" or the \"–5, 16\" in \"John 3:4–5, 16\". An en dash is automatically added between this parameter and the verse# parameter unless the end verse flag has a value (see the end verse flag parameter for more info about that usage)",
Line 70: Line 60:
 
},
 
},
 
"6": {
 
"6": {
"aliases": [
 
"footnote"
 
],
 
 
"label": "footnote",
 
"label": "footnote",
"description": "DEPRECATED Letter of footnote to cite to. If this parameter has any value, it changes the citation to link to the verse *and* highlights the footnote matching the letter. If no match found, does not highlight anything.",
+
"description": "[DEPRECATED] letter of footnote to cite to. If this parameter has any value, it changes the citation to link to the verse *and* highlights the footnote matching the letter. If no match found, does not highlight anything.",
"example": "d",
 
 
"deprecated": "In theory this once worked for citations to the LDS church's website, but as of September 2020 it no longer does. It remains solely for backwards compatibility.",
 
"deprecated": "In theory this once worked for citations to the LDS church's website, but as of September 2020 it no longer does. It remains solely for backwards compatibility.",
 
"type": "string"
 
"type": "string"
Line 81: Line 67:
 
"7": {
 
"7": {
 
"label": "cross ref flag",
 
"label": "cross ref flag",
"description": "DEPRECATED If this has any value, then it changes the citation to link to the verse only and displays all verses that cross reference to it in the LDS church website's sidebar. (Ignores the value in footnote, if any)",
+
"description": "[DEPRECATED] if this has any value, then it changes the citation to link to the verse only and displays all verses that cross reference to it in the LDS church website's sidebar. (Ignores the value in footnote, if any)",
"example": "x",
 
 
"deprecated": "In theory this once worked for citations to the LDS church's website, but as of September 2020 it no longer does. It remains solely for backwards compatibility."
 
"deprecated": "In theory this once worked for citations to the LDS church's website, but as of September 2020 it no longer does. It remains solely for backwards compatibility."
 
},
 
},
 
"8": {
 
"8": {
"aliases": [
 
"end verse flag"
 
],
 
 
"label": "nonconsecutive end verse flag",
 
"label": "nonconsecutive end verse flag",
 
"description": "if this has any value at all, then the hyphen before the 'end verse' parameter will not be automatically added. This allows for quoting of non-contiguous verses such as \"John 3:5, 16\" — the end verse parameter in this example should be \", 16\"",
 
"description": "if this has any value at all, then the hyphen before the 'end verse' parameter will not be automatically added. This allows for quoting of non-contiguous verses such as \"John 3:5, 16\" — the end verse parameter in this example should be \", 16\"",
Line 95: Line 77:
 
},
 
},
 
"website": {
 
"website": {
"aliases": [
 
"host",
 
"site",
 
"source"
 
],
 
 
"label": "website",
 
"label": "website",
 
"description": "website to which to link; default is wikisource, but set this (named!) parameter to \"lds\" to cite to the LDS Church's website instead",
 
"description": "website to which to link; default is wikisource, but set this (named!) parameter to \"lds\" to cite to the LDS Church's website instead",
Line 118: Line 95:
 
"8",
 
"8",
 
"website"
 
"website"
],
+
]
"format": "inline"
 
 
}
 
}
 
</templatedata>
 
</templatedata>
Line 127: Line 103:
 
{| class=wikitable
 
{| class=wikitable
 
! Wikitext !! Result !! Notes
 
! Wikitext !! Result !! Notes
 +
|-
 +
| {{tlx|LDS}}
 +
| {{LDS}}
 +
| Not providing any parameters produces a link to the LDS standard works listed in the Mormonism portal on Wikisource
 +
|-
 +
| {{tlx|LDS|Helaman|helaman}}
 +
| {{LDS|Helaman|helaman}}
 +
| Cite to entire book (e.g., Helaman)
 +
|-
 +
| {{tlx|LDS|The First Book of Nephi|1ne}}
 +
| {{LDS|The First Book of Nephi|1ne}}
 +
| The display text parameter can be used to specify exactly how the book name is displayed
 
|-
 
|-
 
| {{tlx|LDS|Eth.|Ether|12}}
 
| {{tlx|LDS|Eth.|Ether|12}}
 
| {{LDS|Eth.|Ether|12}}
 
| {{LDS|Eth.|Ether|12}}
| Cite to entire chapter
+
| Cite to entire chapter (e.g., Ether 12)
 
|-
 
|-
 
| {{tlx|LDS|Doctrine and Covenants|dc|130|22}}  
 
| {{tlx|LDS|Doctrine and Covenants|dc|130|22}}  
 
| {{LDS|Doctrine and Covenants|dc|130|22}}
 
| {{LDS|Doctrine and Covenants|dc|130|22}}
| Cite to specific verse
+
| Cite to specific verse (e.g., D&C 130:22)
 
|-
 
|-
 
| {{tlx|LDS|1 Nephi|1_ne|22|22|24}}  
 
| {{tlx|LDS|1 Nephi|1_ne|22|22|24}}  
 
| {{LDS|1 Nephi|1_ne|22|22|24}}
 
| {{LDS|1 Nephi|1_ne|22|22|24}}
| Cite to consecutive range of verses; note the en dash automatically added between beginning and ending verses
+
| Cite to consecutive range of verses simply by adding an end verse parameter (note the en dash automatically added between beginning and ending verses)
 
|-
 
|-
| {{tlx|LDS|John|john|3|5}}
+
| {{tlx|LDS|John|john|3|5|–14, 16|&#124;&#124;y}} <!-- have to use HTML code for pipes due to {{tlx}} -->
| {{LDS|John|john|3|5}}
+
| {{LDS|John|john|3|5|–14, 16|||y}}
| Cite to KJV of the Bible
+
| Cite to nonconsecutive verses (note that the en dash must be manually included in this instance)
 
|-
 
|-
| {{tlx|LDS|John|john|3|5|–14, 16&#124;&#124;|x}}  
+
| <pre>Some famous scriptures in Ether are {{LDS|Eth.|Ether|12|4|, 6|||y}}, {{LDS||ether|13|9}}, and {{LDS||ether|15|31}}.</pre>
| {{LDS|John|john|3|5|–14, 16|||y}}
+
| Some famous scriptures in Ether are {{LDS|Eth.|Ether|12|4|, 6|||y}}; {{LDS||ether|13|9}}; and {{LDS||ether|15|31}}.
| Cite to nonconsecutive range of verses; note that the en dash must be manually added
+
| Leave the display text parameter blank to only include the chapter/verse in the link
 +
|-
 +
| <pre>{{LDS|1 Ne.|1_ne|3|7|8|website=lds}}</pre>
 +
| {{LDS|1 Ne.|1_ne|3|7|8|website=lds}}
 +
| Include "website=lds" to link to the LDS Church's website
 
|}
 
|}
  
 
=== See also ===
 
=== See also ===
 +
* The {{m1|LDSverse}} module's [[Module_talk:LDSverse/testcases|test cases page]] has many more usage examples, including citations to the KJV, the Book of Mormon, the Doctrine and Covenants, the Pearl of Great Price, and the Lectures on Faith.
 
* {{tl|LDS/legacy}}
 
* {{tl|LDS/legacy}}
 
* {{tl|Bibleverse}}
 
* {{tl|Bibleverse}}

Revision as of 10:09, 1 September 2020

This template makes it easy to create links to Latter Day Saint movement scriptures, including to specific chapters/sections and verses inside those texts. By default, the template links to the texts as stored on Wikisource, but adding the optional "website=lds" parameter will create links to the LDS Church's website instead.

The most common usage for the template, citing to a single scripture verse, uses four parameters: {{LDS|display text|book name|chapter|verse}}

For example, {{LDS|Eth.|Ether|12|4}} renders as Eth. 12:4.

Additional parameters can be provided to cite to a range of verses and/or to the LDS Church website instead of Wikisource, as explained below.

Basic usage

{{LDS|Eth.|Ether|12|4}}

Results:

  1. Creates html link to https://en.wikisource.org/wiki/Book_of_Mormon_(1981)/Ether#12:4
  2. Jumps to verse on page
  3. Displays in the article text as: Eth. 12:4

Note

The first two parameters ("display text" and "book name") in many cases may be the same or similar, but they should always both be provided. For example, to produce Alma 7:11 you should type {{LDS|Alma|alma|7|11}}. Forgetting to provide the book name when it is the same or similar to the display text is the most common error when using this template.

Template Data

For citing to Latter Day Saint movement scriptures on Wikisource (or the LDS church website)

Template parameters

ParameterDescriptionTypeStatus
display text1

text to display to user before the chapter/verse numbers; usually the full book name ("First Nephi") or an abbreviation ("1 Ne."), but it could be anything (e.g., "My favorite book of scripture") or even left blank (useful if citing to multiple different chapters of the same book and you don't want to repeat the book name)

Default
LDS Standard Works
Example
1 Ne.
Stringsuggested
book name2

name of book (or abbreviation of book used by LDS Church website); this parameter is not case sensitive (e.g., 'alma' is the same as 'Alma')

Example
1-ne
Stringsuggested
chapter3

chapter (or section) of scripture being cited

Example
12
Numberoptional
verse4

verse of scripture being cited

Example
4
Numberoptional
end verse5

end verse(s) of a series of cited verses, such as the 5 in "John 3:4–5" or the "–5, 16" in "John 3:4–5, 16". An en dash is automatically added between this parameter and the verse# parameter unless the end verse flag has a value (see the end verse flag parameter for more info about that usage)

Example
5
Stringoptional
footnote6

[DEPRECATED] letter of footnote to cite to. If this parameter has any value, it changes the citation to link to the verse *and* highlights the footnote matching the letter. If no match found, does not highlight anything.

Stringdeprecated
cross ref flag7

[DEPRECATED] if this has any value, then it changes the citation to link to the verse only and displays all verses that cross reference to it in the LDS church website's sidebar. (Ignores the value in footnote, if any)

Unknowndeprecated
nonconsecutive end verse flag8

if this has any value at all, then the hyphen before the 'end verse' parameter will not be automatically added. This allows for quoting of non-contiguous verses such as "John 3:5, 16" — the end verse parameter in this example should be ", 16"

Example
y
Stringoptional
websitewebsite

website to which to link; default is wikisource, but set this (named!) parameter to "lds" to cite to the LDS Church's website instead

Default
wikisource
Example
lds
Stringoptional

Examples

Wikitext Result Notes
{{LDS}} LDS Standard Works Not providing any parameters produces a link to the LDS standard works listed in the Mormonism portal on Wikisource
{{LDS|Helaman|helaman}} Helaman Cite to entire book (e.g., Helaman)
{{LDS|The First Book of Nephi|1ne}} The First Book of Nephi The display text parameter can be used to specify exactly how the book name is displayed
{{LDS|Eth.|Ether|12}} Eth. 12 Cite to entire chapter (e.g., Ether 12)
{{LDS|Doctrine and Covenants|dc|130|22}} Doctrine and Covenants 130:22 Cite to specific verse (e.g., D&C 130:22)
{{LDS|1 Nephi|1_ne|22|22|24}} 1 Nephi 22:22–24 Cite to consecutive range of verses simply by adding an end verse parameter (note the en dash automatically added between beginning and ending verses)
{{LDS|John|john|3|5|–14, 16|||y}} John 3:5–14, 16 Cite to nonconsecutive verses (note that the en dash must be manually included in this instance)
Some famous scriptures in Ether are {{LDS|Eth.|Ether|12|4|, 6|||y}}, {{LDS||ether|13|9}}, and {{LDS||ether|15|31}}.
Some famous scriptures in Ether are Eth. 12:4, 6; 13:9; and 15:31. Leave the display text parameter blank to only include the chapter/verse in the link
{{LDS|1 Ne.|1_ne|3|7|8|website=lds}}
1 Ne. 3:7–8 Include "website=lds" to link to the LDS Church's website

See also

  • The LDSverse module's test cases page has many more usage examples, including citations to the KJV, the Book of Mormon, the Doctrine and Covenants, the Pearl of Great Price, and the Lectures on Faith.
  • {{LDS/legacy}}
  • {{Bibleverse}}