Template:Muwatta: Difference between revisions

From WikiIslam, the online resource on Islam
Jump to navigation Jump to search
[checked revision][checked revision]
(Clarified comments)
(updated for simplified quranx url)
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|}}} }}  
     | in-book = [http://quranx.com/Hadith/Malik/ByIndex/In-Book/Book-{{#expr:{{{1|1}}}}}/Hadith-{{#expr:{{{3|1}}}}}/ Al-Muwatta {{{1|1}}}:{{{3|1}}} (In-Book Ref)]
     | in-book = [http://quranx.com/Hadith/Malik/In-Book/Book-{{#expr:{{{1|1}}}}}/Hadith-{{#expr:{{{3|1}}}}}/ Al-Muwatta {{{1|1}}}:{{{3|1}}} (In-Book Ref)]
     | [http://quranx.com/Hadith/Malik/ByIndex/In-Book/Book-{{#expr:{{{1|1}}}}}/Hadith-{{#expr:{{{3|1}}}}}/ Al-Muwatta {{{1|1}}}:{{{3|1}}} (5th parameter error)]
     | [http://quranx.com/Hadith/Malik/In-Book/Book-{{#expr:{{{1|1}}}}}/Hadith-{{#expr:{{{3|1}}}}}/ Al-Muwatta {{{1|1}}}:{{{3|1}}} (5th parameter error)]
   }}|
   }}|
     {{#ifexpr: {{#var:Clean4thParameter}}  |  [http://quranx.com/Hadith/Malik/ByIndex/USC-MSA/Book-{{#expr:{{{2|1}}}}}/Hadith-{{#expr:{{#var:Clean4thParameter}}}}/ Al-Muwatta {{{2|1}}}:{{{4|1}}}]  |  [http://quranx.com/Hadith/Malik/ByIndex/USC-MSA/Book-{{#expr:{{{1|1}}}}}/Hadith-{{#expr:{{{3|1}}}}}/ Al-Muwatta {{{1|1}}}:{{{3|1}}}]  
     {{#ifexpr: {{#var:Clean4thParameter}}  |  [http://quranx.com/Hadith/Malik/USC-MSA/Book-{{#expr:{{{2|1}}}}}/Hadith-{{#expr:{{#var:Clean4thParameter}}}}/ Al-Muwatta {{{2|1}}}:{{{4|1}}}]  |  [http://quranx.com/Hadith/Malik/USC-MSA/Book-{{#expr:{{{1|1}}}}}/Hadith-{{#expr:{{{3|1}}}}}/ Al-Muwatta {{{1|1}}}:{{{3|1}}}]  
     }}   
     }}   
}}<noinclude>
}}<noinclude>

Revision as of 07:53, 2 February 2017

Al-Muwatta 1:1

This template is used to provide sources for al-Muwatta references. It formerly produced links to the cmje website, which no longer works. We are currently using QuranX.com instead, which is able to handle USC-MSA, and in-book (Arabic) reference conventions.


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 cmje site)
Third Parameter is the Hadith Number.
Forth 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 Paramater (optional) is used to indicate that you are using the alternative In-book referencing system (default is USC-MSA).

The In-book reference system for Muwatta Malik is on other sites called 'Arabic Reference'.

Example for hadiths using MSA-USC numbering
{{Muwatta|14||8}} (note the empty 2nd parameter)

Produces:

Al-Muwatta 14:8

Example for the same hadith using in-book numbering
{{Muwatta|14||465||in-book}} (note the empty 2nd and 4th parameters)

Produces:

Al-Muwatta 14:465 (In-Book Ref)