Difference between revisions of "Template:LDS/doc"

From blackwiki
Jump to navigation Jump to search
imported>Biggins
m (Explained usage of the "website" parameter more thoroughly)
imported>Biggins
(General reorganization; biggest change was deleting the redundant section manually laying out parameter details in order to solely use the TemplateData extension)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
  
== Usage ==
+
This template links to the English version of [[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 links to the English version of LDS texts on [[Wikisource:|Wikisource]] and makes for easier referencing inside those texts.
 
  
:'''Note:''' This template does not use parameter names (with the exception of a parameter for specifying the website that hosts the text, as explained below). Other parameter names below are only for documentation purposes. Parameters must be passed in the order given. Do not use spaces before or after the pipe "|"
+
:'''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.
  
=== Basic usage ===
+
== Basic usage ==
 
{{tlx|LDS|Eth.|Ether|12|4}}
 
{{tlx|LDS|Eth.|Ether|12|4}}
  
Line 14: Line 13:
 
# Displays in the article text as: {{LDS|Eth.|Ether|12|4}}
 
# Displays in the article text as: {{LDS|Eth.|Ether|12|4}}
  
=== Full usage ===
+
== Parameters ==
<pre>{{LDS|display|book name|chap#|verse#|end verse#|footnote|cross ref flag|end verse flag|website}}</pre>
 
'''Parameters:'''
 
{| class=wikitable
 
! parameter !! description !! optional?
 
|-
 
! style="white-space:nowrap;" | {{para|display}}
 
| name of book to display in Wikipedia (e.g., "1. Ne.") || optional
 
|-
 
! style="white-space:nowrap;" | {{para|book name}}
 
| book name (either the full name or the short name (abbreviation) used by the LDS Church's website (see below) || optional
 
|-
 
! style="white-space:nowrap;" | {{para|chap#}}
 
| chapter or section of scripture being quoted || optional
 
|-
 
! style="white-space:nowrap;" | {{para|verse#}}
 
| verse of scripture being quoted || optional
 
|-
 
! style="white-space:nowrap;" | {{para|end verse#}}
 
| end verse of a series of verses, such as the {{code|5}} in "John 3:3–5"<br>The en dash is automatically added—unless {{code|end verse flag}} has a value, which allows quoting of non-contiguous verses such as "John 3:5, 16" — the {{code|end verse#}} in that situation should be {{code|", 16"}} || optional
 
|-
 
! style="white-space:nowrap;" | {{para|footnote}}
 
| letter of footnote - changes link to a link to the verse - and highlights the footnote matching the letter. If no match found, does not highlight anything || optional  (''deprecated'')
 
|-
 
! style="white-space:nowrap;" | {{para|cross ref flag}}
 
| if this has any value, then it changes link to a link to the verse only and all verses that cross reference to it ignores the value in footnote (if any) || optional  (''deprecated'')
 
|-
 
! style="white-space:nowrap;" | {{para|end verse flag}}
 
| if this has any value, then the hyphen before {{code|end verse#}} is not automatically added || optional
 
|-
 
! style="white-space:nowrap;" | {{para|website}}
 
| this parameter may specify the website to which to cite. The default value is "wikisource". Including "website=lds" as a parameter will invoke the {{tl|LDS/legacy}} template and link to [https://www.churchofjesuschrist.org/study/scriptures the LDS Scriptures on the website of the Church of Jesus Christ of Latter-day Saints]. || optional
 
|}
 
 
 
=== Examples with explanation ===
 
{{update-section}}
 
{| class=wikitable
 
|-
 
! Example text !! Description !! URL & Display text
 
|-
 
|{{tlx|LDS|Eth.|Ether|12}} || Link to Chapter only || https://en.wikisource.org/wiki/Book_of_Mormon_(1981)/Ether#Chapter_12 <br> [https://en.wikisource.org/wiki/Book_of_Mormon_(1981)/Ether#Chapter_12 Ether 12] <br>{{LDS|Eth. 12|Ether|12}}
 
|-
 
|{{tlx|LDS|Eth.|Ether|12|4}} || Link to verse || https://en.wikisource.org/wiki/Book_of_Mormon_(1981)/Ether#12:4 <br> [https://en.wikisource.org/wiki/Book_of_Mormon_(1981)/Ether#12:4 Ether 12:4]<br>{{LDS|Eth.|Ether|12|4}}
 
|-
 
|{{tlx|LDS|John|john|3|5|,14-16|website=lds|<nowiki />|<nowiki />|x}} ||  ''deprecated'' || https://www.churchofjesuschrist.org/study/scriptures/nt/john/3.5,14-16?lang=eng#4 <br> [https://www.churchofjesuschrist.org/study/scriptures/nt/john/3.5,14-16?lang=eng#4 John 3:5,14-16]<br>{{LDS|John|john|3|5|,14-16|||x|website=lds}}
 
|-
 
| {{tlx|LDS|Eth.|Ether|12|4|d|website=lds}} || Link to footnotes - ''deprecated''
 
|}
 
 
 
=== Examples and results ===
 
{| class=wikitable
 
! wikitext !! link result
 
|-
 
| {{tlx|LDS|Genesis|gen|48}}
 
| {{LDS|Genesis|gen|48}}
 
|-
 
| {{tlx|LDS|Doctrine and Covenants|dc|130|22}}
 
| {{LDS|Doctrine and Covenants|dc|130|22}}
 
|-
 
| {{tlx|LDS|1 Nephi|1_ne|22|22|24}}
 
| {{LDS|1 Nephi|1_ne|22|22|24}}
 
|-
 
| {{tlx|LDS|Moroni|moro|10|3|5}}
 
| {{LDS|Moroni|moro|10|3|5}}
 
|-
 
| {{tlx|LDS|John|john|3|5}}
 
| {{LDS|John|john|3|5}}
 
|-
 
| {{tlx|LDS|John|john|3|5|,14-16&#124;&#124;|x}}
 
| {{LDS|John|john|3|5|,14-16|||x}}
 
|-
 
| {{tlx|LDS|John|john|3|5&#124;|d}}
 
| {{LDS|John|john|3|5||d}}
 
|-
 
| {{tlx|LDS|Jeremiah|jer|1|5&#124;|d}}
 
| {{LDS|Jeremiah|jer|1|5||d}}
 
|-
 
| {{tlx|LDS|Jeremiah|jer|1|5&#124;|d|x}}
 
| {{LDS|Jeremiah|jer|1|5||d|x}}
 
|}
 
 
 
== Template Data ==
 
 
<templatedata>
 
<templatedata>
 
{
 
{
Line 101: Line 19:
 
"1": {
 
"1": {
 
"aliases": [
 
"aliases": [
"Display Name",
+
"display",
"display"
+
"display name"
 
],
 
],
"label": "display",
+
"label": "display text",
"description": "name of book to display in Wikipedia",
+
"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.",
Line 113: Line 31:
 
"2": {
 
"2": {
 
"aliases": [
 
"aliases": [
"book name"
+
"book"
 
],
 
],
 
"label": "book name",
 
"label": "book name",
Line 123: Line 41:
 
"3": {
 
"3": {
 
"aliases": [
 
"aliases": [
"chap#",
+
"chap",
"chapter"
+
"section"
 
],
 
],
"label": "chap#",
+
"label": "chapter",
"description": "chapter of scripture being quoted\t",
+
"description": "chapter (or section) of scripture being cited\t",
 
"example": "12",
 
"example": "12",
 
"type": "number"
 
"type": "number"
Line 133: Line 51:
 
"4": {
 
"4": {
 
"aliases": [
 
"aliases": [
"verse#",
+
"initial verse"
"verse"
 
 
],
 
],
"label": "verse#",
+
"label": "verse",
"description": "verse of scripture being quoted\t",
+
"description": "verse of scripture being cited\t",
 
"type": "number",
 
"type": "number",
 
"example": "4"
 
"example": "4"
Line 143: Line 60:
 
"5": {
 
"5": {
 
"aliases": [
 
"aliases": [
"end verse#",
+
"end verses"
"end verse"
 
 
],
 
],
"label": "end verse#",
+
"label": "end verse",
"description": "end verse of a series of verses, such as the 5 in \"John 3:3–5\". The en dash is automatically added unless end verse flag has a value, which allows quoting of non-contiguous verses such as \"John 3:5, 16\" — the end verse# in that situation should be \", 16\"\t"
+
"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)",
 +
"example": "5",
 +
"type": "string"
 
},
 
},
 
"6": {
 
"6": {
Line 154: Line 72:
 
],
 
],
 
"label": "footnote",
 
"label": "footnote",
"description": "letter of footnote - changes link to a link to the verse - and highlights the footnote matching the letter. If no match found, does not highlight anything\t",
+
"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",
 
"example": "d",
"deprecated": true
+
"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"
 
},
 
},
 
"7": {
 
"7": {
"aliases": [
 
"cross ref flag"
 
],
 
 
"label": "cross ref flag",
 
"label": "cross ref flag",
"description": "if this has any value, then it changes link to a link to the verse only and all verses that cross reference to it ignores the value in footnote (if any)\t",
+
"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",
 
"example": "x",
"deprecated": true
+
"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.",
 +
"autovalue": ""
 
},
 
},
 
"8": {
 
"8": {
Line 171: Line 88:
 
"end verse flag"
 
"end verse flag"
 
],
 
],
"label": "end verse flag",
+
"label": "nonconsecutive verse flag",
"description": "if this has any value, then the hyphen before `end verse#` is not automatically added\t",
+
"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\"",
"example": "y"
+
"example": "y",
 +
"type": "string",
 +
"autovalue": ""
 
},
 
},
 
"website": {
 
"website": {
 
"aliases": [
 
"aliases": [
"website",
 
 
"host",
 
"host",
 
"site",
 
"site",
Line 183: Line 101:
 
],
 
],
 
"label": "website",
 
"label": "website",
"description": "website to which to cite",
+
"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",
 
"example": "lds",
 
"example": "lds",
 
"type": "string",
 
"type": "string",
Line 189: Line 107:
 
}
 
}
 
},
 
},
"description": "This template links to the English version of LDS texts on Wikisource and makes for easier referencing inside those texts.\n\nNote: This template does not use parameter names (with the exception of a parameter for specifying the website that hosts the text, as explained below). Other parameter names below are only for documentation purposes. Parameters must be passed in the order given. Do not use spaces before or after the pipe \"|\"",
+
"description": "For citing to the English version of LDS scriptures on Wikisource (or the LDS church website)",
 
"paramOrder": [
 
"paramOrder": [
 
"1",
 
"1",
Line 200: Line 118:
 
"8",
 
"8",
 
"website"
 
"website"
]
+
],
 +
"format": "inline"
 
}
 
}
 
</templatedata>
 
</templatedata>
 +
 +
== Examples ==
 +
{{update-section}}
 +
 +
<pre>{{LDS|display|book name|chap#|verse#|end verse#|footnote|cross ref flag|end verse flag|website}}</pre>
 +
 +
{| class=wikitable
 +
|-
 +
! Example text !! Description !! URL & Display text
 +
|-
 +
|{{tlx|LDS|Eth.|Ether|12}} || Link to Chapter only || https://en.wikisource.org/wiki/Book_of_Mormon_(1981)/Ether#Chapter_12 <br> [https://en.wikisource.org/wiki/Book_of_Mormon_(1981)/Ether#Chapter_12 Ether 12] <br>{{LDS|Eth. 12|Ether|12}}
 +
|-
 +
|{{tlx|LDS|Eth.|Ether|12|4}} || Link to verse || https://en.wikisource.org/wiki/Book_of_Mormon_(1981)/Ether#12:4 <br> [https://en.wikisource.org/wiki/Book_of_Mormon_(1981)/Ether#12:4 Ether 12:4]<br>{{LDS|Eth.|Ether|12|4}}
 +
|-
 +
|{{tlx|LDS|John|john|3|5|,14-16|website=lds|<nowiki />|<nowiki />|x}} ||  ''deprecated'' || https://www.churchofjesuschrist.org/study/scriptures/nt/john/3.5,14-16?lang=eng#4 <br> [https://www.churchofjesuschrist.org/study/scriptures/nt/john/3.5,14-16?lang=eng#4 John 3:5,14-16]<br>{{LDS|John|john|3|5|,14-16|||x|website=lds}}
 +
|-
 +
| {{tlx|LDS|Eth.|Ether|12|4|d|website=lds}} || Link to footnotes - ''deprecated''
 +
|}
 +
 +
 +
{| class=wikitable
 +
! wikitext !! link result
 +
|-
 +
| {{tlx|LDS|Genesis|gen|48}}
 +
| {{LDS|Genesis|gen|48}}
 +
|-
 +
| {{tlx|LDS|Doctrine and Covenants|dc|130|22}}
 +
| {{LDS|Doctrine and Covenants|dc|130|22}}
 +
|-
 +
| {{tlx|LDS|1 Nephi|1_ne|22|22|24}}
 +
| {{LDS|1 Nephi|1_ne|22|22|24}}
 +
|-
 +
| {{tlx|LDS|Moroni|moro|10|3|5}}
 +
| {{LDS|Moroni|moro|10|3|5}}
 +
|-
 +
| {{tlx|LDS|John|john|3|5}}
 +
| {{LDS|John|john|3|5}}
 +
|-
 +
| {{tlx|LDS|John|john|3|5|,14-16&#124;&#124;|x}}
 +
| {{LDS|John|john|3|5|,14-16|||x}}
 +
|-
 +
| {{tlx|LDS|John|john|3|5&#124;|d}}
 +
| {{LDS|John|john|3|5||d}}
 +
|-
 +
| {{tlx|LDS|Jeremiah|jer|1|5&#124;|d}}
 +
| {{LDS|Jeremiah|jer|1|5||d}}
 +
|-
 +
| {{tlx|LDS|Jeremiah|jer|1|5&#124;|d|x}}
 +
| {{LDS|Jeremiah|jer|1|5||d|x}}
 +
|}
  
 
=== See also ===
 
=== See also ===

Revision as of 08:43, 1 September 2020

This template links to the English version of 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.

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.

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

Parameters

For citing to the English version of LDS scriptures on Wikisource (or the LDS church website)

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
display text1 display display name

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 book

name of book (or abbreviation of book used by LDS Church website)

Example
1-ne
Stringsuggested
chapter3 chap section

chapter (or section) of scripture being cited

Example
12
Numberoptional
verse4 initial verse

verse of scripture being cited

Example
4
Numberoptional
end verse5 end verses

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 footnote

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
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)

Example
x
Auto value
Unknowndeprecated
nonconsecutive verse flag8 end verse flag

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
Auto value
Stringoptional
websitewebsite host site source

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

Template:Update-section

{{LDS|display|book name|chap#|verse#|end verse#|footnote|cross ref flag|end verse flag|website}}
Example text Description URL & Display text
{{LDS|Eth.|Ether|12}} Link to Chapter only https://en.wikisource.org/wiki/Book_of_Mormon_(1981)/Ether#Chapter_12
Ether 12
Eth. 12 12
{{LDS|Eth.|Ether|12|4}} Link to verse https://en.wikisource.org/wiki/Book_of_Mormon_(1981)/Ether#12:4
Ether 12:4
Eth. 12:4
{{LDS|John|john|3|5|,14-16|||x}} deprecated https://www.churchofjesuschrist.org/study/scriptures/nt/john/3.5,14-16?lang=eng#4
John 3:5,14-16
John 3:5,14-16
{{LDS|Eth.|Ether|12|4|d}} Link to footnotes - deprecated


wikitext link result
{{LDS|Genesis|gen|48}} Genesis 48
{{LDS|Doctrine and Covenants|dc|130|22}} Doctrine and Covenants 130:22
{{LDS|1 Nephi|1_ne|22|22|24}} 1 Nephi 22:22–24
{{LDS|Moroni|moro|10|3|5}} Moroni 10:3–5
{{LDS|John|john|3|5}} John 3:5
{{LDS|John|john|3|5|,14-16|||x}} John 3:5,14-16
{{LDS|John|john|3|5||d}} John 3:5–
{{LDS|Jeremiah|jer|1|5||d}} Jeremiah 1:5–
{{LDS|Jeremiah|jer|1|5||d|x}} Jeremiah 1:5–

See also