Template:Muwatta: Difference between revisions
| [checked revision] | [checked revision] |
Lightyears (talk | contribs) (Clarified comments) |
Lightyears (talk | contribs) No edit summary |
||
| (4 intermediate revisions by the same user not shown) | |||
| Line 12: | Line 12: | ||
}}<!--If parameter 5 exists and is not erroneously mistyped, create an In-book reference url with 1st and 3rd parameters. If no 5th parameter, create a USC-MSA ref url, using parameters 2 and 4 for cases where the old template was misused (i.e. 4 contains a number), or otherwise with parameters 1 and 3-->{{#if: {{{5|}}} | | }}<!--If parameter 5 exists and is not erroneously mistyped, create an In-book reference url with 1st and 3rd parameters. If no 5th parameter, create a USC-MSA ref url, using parameters 2 and 4 for cases where the old template was misused (i.e. 4 contains a number), or otherwise with parameters 1 and 3-->{{#if: {{{5|}}} | | ||
{{ #switch: {{lc: {{{5|}}} }} | {{ #switch: {{lc: {{{5|}}} }} | ||
| | | arabic = [https://quranx.com/Hadith/Malik/In-Book/Book-{{{1|1}}}/Hadith-{{{3|1}}}/ Al-Muwatta {{{1|1}}}:{{{3|1}}} (Arabic Ref)] | ||
| [ | | [https://quranx.com/Hadith/Malik/In-Book/Book-{{{1|1}}}/Hadith-{{{3|1}}}/ Al-Muwatta {{{1|1}}}:{{{3|1}}} (5th parameter error)] | ||
}}| | }}| | ||
{{#ifexpr: {{#var:Clean4thParameter}} | [ | {{#ifexpr: {{#var:Clean4thParameter}} | [https://quranx.com/Hadith/Malik/USC-MSA/Book-{{{2|1}}}/Hadith-{{#var:Clean4thParameter}}/ Al-Muwatta {{{2|1}}}:{{{4|1}}}] | [https://quranx.com/Hadith/Malik/USC-MSA/Book-{{{1|1}}}/Hadith-{{{3|1}}}/ Al-Muwatta {{{1|1}}}:{{{3|1}}}] | ||
}} | }} | ||
}}<noinclude> | }}<noinclude> | ||
<!--The noinclude tag must be right at the end of the template on the same line or you will get new lines after its use in some situations. The final and first brackets of the two if statements must be on the same line (ignoring comments) to avoid sometimes getting new lines before the template.--> | <!--The noinclude tag must be right at the end of the template on the same line or you will get new lines after its use in some situations. The final and first brackets of the two if statements must be on the same line (ignoring comments) to avoid sometimes getting new lines before the template.--> | ||
< | <templatedata> | ||
{ | |||
"description": "This template will create a link to the specified hadith in Muwatta Malik. Please visit its template page or read the Citing Sources page for instructions on its use with alternative hadith reference systems.", | |||
"params": { | |||
"1": { | |||
"label": "Book number", | |||
"description": "The Book number when using the USC-MSA or Arabic reference system", | |||
"required": true, | |||
"type": "number", | |||
"default": "1", | |||
"example": "27" | |||
}, | |||
"2": { | |||
"label": "Section number", | |||
"description": "Enter a single empty space (obsolete parameter)", | |||
"required": false, | |||
"suggested": true, | |||
"type": "number", | |||
"default": "1", | |||
"example": "27" | |||
}, | |||
"3": { | |||
"label": "Hadith number", | |||
"description": "The hadith number", | |||
"required": true, | |||
"type": "number", | |||
"default": "1", | |||
"example": "8" | |||
}, | |||
"4": { | |||
"label": "Suffix", | |||
"description": "Any suffix letter after the hadith number (can be left blank, or enter a single space if also entering a value for the next parameter)", | |||
"required": false, | |||
"suggested": true, | |||
"type": "string", | |||
"default": "", | |||
"example": "a" | |||
}, | |||
"5": { | |||
"label": "Alternative reference system", | |||
"description": "Enter arabic when you are using the Arabic reference system (leave blank if using the USC-MSA reference system)", | |||
"required": false, | |||
"suggested": true, | |||
"type": "string", | |||
"default": "", | |||
"example": "arabic" | |||
} | |||
} | |||
} | |||
</templatedata> | |||
This template is used to provide sources for al-Muwatta references. It formerly produced links to | This template is used to provide sources for al-Muwatta references. It formerly produced links to USC's CMJE website, which is retired. We are currently using QuranX.com instead, which is able to handle USC-MSA, and in-book (Arabic) reference conventions. The Arabic reference system is labelled as such on sunnah.com and is of unknown origin. | ||
Detailed information about the hadith translations and reference systems available on QuranX.com can be read in the following document: https://github.com/QuranX/QuranX/blob/master/docs/QuranXHadiths.md | |||
==Usage== | ==Usage== | ||
First Parameter is the Book Number.<BR> | First Parameter is the Book Number.<BR> | ||
Second Parameter is the Section Number (leave this empty - it is ignored by the current template and was used for the | Second Parameter is the Section Number (leave this empty - it is ignored by the current template and was used for the old CMJE site; but if using Visual Editor, enter a single empty space)<BR> | ||
Third Parameter is the Hadith Number.<BR> | Third Parameter is the Hadith Number.<BR> | ||
Fourth Parameter is for the a, b, c etc suffix which some hadiths have on cmje (leave this empty - it is ignored by the current template except for any number within it due to some editors incorrectly using the template in the past by putting the hadith number in there (with or without suffix) and the book number in the 2nd parameter) | |||
Fifth | Fifth Parameter (optional) is used to indicate that you are using the Arabic reference system (default is USC-MSA). | ||
;Example for hadiths using MSA | ;Example for hadiths using USC-MSA numbering: | ||
:<nowiki>{{Muwatta|14||8}}</nowiki> (note the empty 2nd parameter) | :<nowiki>{{Muwatta|14||8}}</nowiki> (note the empty 2nd parameter) | ||
| Line 41: | Line 88: | ||
:{{Muwatta|14||8}} | :{{Muwatta|14||8}} | ||
;Example for the same hadith using | ;Example for the same hadith using Arabic reference numbering: | ||
:<nowiki>{{Muwatta|14||465|| | :<nowiki>{{Muwatta|14||465||arabic}}</nowiki> (note the empty 2nd and 4th parameters) | ||
Produces: | Produces: | ||
:{{Muwatta|14||465|| | :{{Muwatta|14||465||arabic}} | ||
Latest revision as of 01:16, 13 November 2025
This template will create a link to the specified hadith in Muwatta Malik. Please visit its template page or read the Citing Sources page for instructions on its use with alternative hadith reference systems.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Book number | 1 | The Book number when using the USC-MSA or Arabic reference system
| Number | required |
| Section number | 2 | Enter a single empty space (obsolete parameter)
| Number | suggested |
| Hadith number | 3 | The hadith number
| Number | required |
| Suffix | 4 | Any suffix letter after the hadith number (can be left blank, or enter a single space if also entering a value for the next parameter)
| String | suggested |
| Alternative reference system | 5 | Enter arabic when you are using the Arabic reference system (leave blank if using the USC-MSA reference system)
| String | suggested |
This template is used to provide sources for al-Muwatta references. It formerly produced links to USC's CMJE website, which is retired. We are currently using QuranX.com instead, which is able to handle USC-MSA, and in-book (Arabic) reference conventions. The Arabic reference system is labelled as such on sunnah.com and is of unknown origin.
Detailed information about the hadith translations and reference systems available on QuranX.com can be read in the following document: https://github.com/QuranX/QuranX/blob/master/docs/QuranXHadiths.md
Usage
First Parameter is the Book Number.
Second Parameter is the Section Number (leave this empty - it is ignored by the current template and was used for the old CMJE site; but if using Visual Editor, enter a single empty space)
Third Parameter is the Hadith Number.
Fourth Parameter is for the a, b, c etc suffix which some hadiths have on cmje (leave this empty - it is ignored by the current template except for any number within it due to some editors incorrectly using the template in the past by putting the hadith number in there (with or without suffix) and the book number in the 2nd parameter)
Fifth Parameter (optional) is used to indicate that you are using the Arabic reference system (default is USC-MSA).
- Example for hadiths using USC-MSA numbering
- {{Muwatta|14||8}} (note the empty 2nd parameter)
Produces:
- Example for the same hadith using Arabic reference numbering
- {{Muwatta|14||465||arabic}} (note the empty 2nd and 4th parameters)
Produces: