WikiIslam:Templates: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
mNo edit summary
Line 2: Line 2:
A Stub template can be included on a stub page (a page that needs more content) by simple insert <nowiki>{{</nowiki>stub}} on the page. Notice that we left out the keyword (Template:) and surrounded the name of the template page with double curly brackets. Mediawiki calls this a transclusion ([http://www.mediawiki.org/wiki/Transclusion more info]).
A Stub template can be included on a stub page (a page that needs more content) by simple insert <nowiki>{{</nowiki>stub}} on the page. Notice that we left out the keyword (Template:) and surrounded the name of the template page with double curly brackets. Mediawiki calls this a transclusion ([http://www.mediawiki.org/wiki/Transclusion more info]).


Try including a template right now in the [[WikiIslam:Sandbox|Sandbox]] page by insert <nowiki>{{</nowiki>stub}} in the page and saving or previewing it. Templates can also be flexible when they use variables. For example writing <nowiki>{{</nowiki>Quran|2|131}} will use the two variables to make a link to that part of the Quran. The result is this: {{Quran|2|131}}. Another example of a templates that uses variables: [[Muhammad and History's 100 Most Influential People]]. Here the box at the right uses a template. You can see the code for that box by clicking edit.
Try including a template right now in the [[WikiIslam:Sandbox|Sandbox]] page by insert <nowiki>{{</nowiki>stub}} in the page and saving or previewing it. Templates can also be flexible when they use variables. For example writing <nowiki>{{</nowiki>Quran|2|131}} will use the two variables to make a link to that part of the Quran. The result is this: {{Quran|2|131}}. Another example of a templates that uses variables: [[Muhammad and Historys 100 Most Influential People|Muhammad and History's 100 Most Influential People]]. Here the box at the right uses a template. You can see the code for that box by clicking edit.


Templates can be used to produce small pieces of text like {{Quran|2|131}} or a large piece of content such as the [[Template:QuranHadithScholarsIndex|Index]] table for the Quran, Hadith and Scholars pages. If a page contains templates, clicking the Edit link will show you a list of all templates used on that page at the bottom of the editing interface.
Templates can be used to produce small pieces of text like {{Quran|2|131}} or a large piece of content such as the [[Template:QuranHadithScholarsIndex|Index]] table for the Quran, Hadith and Scholars pages. If a page contains templates, clicking the Edit link will show you a list of all templates used on that page at the bottom of the editing interface.
48,466

edits

Navigation menu