Difference between revisions of "Template:Cite Talmud/sandbox"

From blackwiki
Jump to navigation Jump to search
imported>Daask
m (Fix typo)
imported>Daask
(Switch to invoking Module:Talmud)
 
Line 1: Line 1:
<includeonly>[[Talmud]], {{#switch: {{#ifeq:{{{1|}}}||b|{{{1|}}}}}
+
<includeonly>{{#invoke:Talmud|generate_citation}}</includeonly><noinclude>
| b = [{{{url|https://www.sefaria.org/{{replace|{{{2}}}| |_}}.{{replace|{{#if:{{{4|}}}|{{{4}}}|2a}}| |}}}}} <abbr title="Babylonian">b.</abbr> {{{2}}} {{{4|}}}]
 
| y = [{{{url|https://www.sefaria.org/Jerusalem_Talmud_{{replace|{{{2}}}| |_}}.{{replace|{{#if:{{{4|}}}|{{{4}}}|2a}}| |}}}}} <abbr title="Jerusalem">y.</abbr> {{{2}}} {{{4|}}}]
 
|    {{error | First argument must be either b for Babylonian Talmud or y for Jerusalem Talmud.}}
 
}}{{Ifpreview|{{#ifeq: {{trim|{{{3|}}}}}||| {{small| Note: Chapter name and numbers are not yet implemented. This message is shown only in previews. }} }}| }}</includeonly><noinclude>
 
 
{{Documentation}}
 
{{Documentation}}
 
<!-- Categories go on the /doc subpage and interwikis go on Wikidata. -->
 
<!-- Categories go on the /doc subpage and interwikis go on Wikidata. -->
 
</noinclude>
 
</noinclude>

Latest revision as of 22:00, 14 May 2019

Template documentation[view] [edit] [history] [purge]

Usage

Parameters

  1. b for Babylonian Talmud or y for Jerusalem Talmud. Babylonian is default.
  2. Tractate name (required)
  3. Chapter name or number (optional)
  4. daf (optional) – These are page or folio numbers as described at Talmud#Slavuta Talmud 1795 and Vilna Talmud 1835. Ranges are accepted, eg. 2b-4a
  5. Boolean (optional) – 'yes' will cause it to generate without the preceding Talmud, b.

Example

{{Cite Talmud|b|Shabbat||3b-5a}}

Talmud, b. Shabbat 3b-5a, or
{{Cite Talmud|b|Shabbat||3b-5a|yes}}

Shabbat 3b-5a if 5 = 'yes'

For additional examples, see Template:Cite Talmud/testcases.


Generate Talmud citation linking to an external website

Template parameters

ParameterDescriptionTypeStatus
Compilation1

'b' for Babylonian or 'y' for Jerusalem

Example
b
Stringrequired
Tractate2

no description

Example
Shabbat
Stringrequired
Chapter3

Chapter name or number

Stringoptional
daf4

Page or folio numbers; ranges are accepted

Example
32b, 2b-4a
Stringoptional
Remove preceding?5

Removes preceding Talmud and abbreviation to compilation if 'yes', if blank (default) or 'no' generates normally

Default
no
Example
yes
Booleanoptional