6,633
edits
mNo edit summary |
|||
Line 1: | Line 1: | ||
Templates are an effective way of [[WikiIslam:Standardization|standardizing content]]. They are like regular wiki pages except that their page name begins with the keyword "Template:" (e.g. [[Template:Stub]]) | Templates are an effective way of [[WikiIslam:Standardization|standardizing content]]. They are like regular wiki pages except that their page name begins with the keyword "Template:" (e.g. [[Template:Stub]]) | ||
A Stub template can be included on a stub page (a page that needs more content) by simply inserting <nowiki>{{</nowiki>stub}} on the page. Notice that the keyword (Template:) has been left out and the name of the template page has been surrounded 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 simply inserting <nowiki>{{</nowiki><nowiki>stub}} on the page. Notice that the keyword (Template:) has been left out and the name of the template page has been surrounded with double curly brackets. Mediawiki calls this a transclusion (</nowiki>[http://www.mediawiki.org/wiki/Transclusion more info]). | ||
Editors can practice including templates on a page by using the [[WikiIslam:Sandbox|Sandbox]] (insert <nowiki>{{</nowiki>stub}} in the page and save or preview 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 Qur'an. The result is this: {{Quran|2|131}} | Editors can practice including templates on a page by using the [[WikiIslam:Sandbox|Sandbox]] (insert <nowiki>{{</nowiki><nowiki>stub}} in the page and save or preview it). Templates can also be flexible when they use variables. For example writing </nowiki><nowiki>{{</nowiki><nowiki>Quran|2|131}} will use the two variables to make a link to that part of the Qur'an. The result is this: </nowiki>{{Quran|2|131}}. | ||
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 Qur'an, Hadith and Scholars pages. If a page contains templates, clicking the Edit link will show 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 Qur'an, Hadith and Scholars pages. If a page contains templates, clicking the Edit link will show a list of all templates used on that page at the bottom of the editing interface. | ||
Line 23: | Line 23: | ||
==Articles that Need Attention== | ==Articles that Need Attention== | ||
* [[Template:Stub]] - for short articles that need expansion | |||
* [[Template:Underconstruction]] - page under construction | *[[Template:Stub]] - for short articles that need expansion | ||
* [[Template:Quality control]] - articles that do not meet quality standards (content, style etc) | *[[Template:Underconstruction]] - page under construction | ||
*[[Template:Quality control]] - articles that do not meet quality standards (content, style etc) | |||
==Misc Templates== | ==Misc Templates== | ||
* [[Template:Essay]] - for putting an essay box at the top right of a page. This is for op-ed type pages that contain personal opinions | *[[Template:Essay]] - for putting an essay box at the top right of a page. This is for op-ed type pages that contain personal opinions | ||
* [[Template:Flag|Flag]] - produces a flag icon for a country. | *[[Template:Flag|Flag]] - produces a flag icon for a country. | ||
* [[Template:Spaces]] - inserts blank spaces in text | *[[Template:Spaces]] - inserts blank spaces in text | ||
* [[Template:Small]] - small text | *[[Template:Small]] - small text | ||
* [[Template:Fontcolor]] - used to change font color when needed | *[[Template:Fontcolor]] - used to change font color when needed | ||
* [[Template:New]] - produces a "new" icon/image | *[[Template:New]] - produces a "new" icon/image | ||
* [[Template:Page title]] - used to change the heading of a page, since page names should ideally not contain brackets, commas and some other characters. Some websites and forums break links with these characters in them. This template produces a safe URL with any page heading. | *[[Template:Page title]] - used to change the heading of a page, since page names should ideally not contain brackets, commas and some other characters. Some websites and forums break links with these characters in them. This template produces a safe URL with any page heading. | ||
* [[WikiIslam:Standardization]] - for templates related to Islamic texts | *[[WikiIslam:Standardization]] - for templates related to Islamic texts | ||
==References== | ==References== | ||
* [[Template:Reflist]] - produces a reference list at the bottom of an article when references (<nowiki><</nowiki>ref> tags) are used | |||
* [[Template:Reference archive]] - used for links to WebCitation.org, which is used for preserving links in the long term | *[[Template:Reflist]] - produces a reference list at the bottom of an article when references (<nowiki><</nowiki>ref> tags) are used | ||
*[[Template:Reference archive]] - used for links to WebCitation.org, which is used for preserving links in the long term | |||
==Books and People== | ==Books and People== | ||
* [[Template:Infobox Book]] - for pages that are about books | |||
* [[Template:Infobox Person]] - for pages that are about a person | *[[Template:Infobox Book]] - for pages that are about books | ||
*[[Template:Infobox Person]] - for pages that are about a person | |||
==Links and Navigation== | ==Links and Navigation== | ||
* [[Template:Plainlink]] - this makes a plain link to a site without having an arrow graphic ([http://example.com/ ]) in the way. | |||
* [[Template:Pagetop]] - makes a link to the top of a page | *[[Template:Plainlink]] - this makes a plain link to a site without having an arrow graphic ([http://example.com/ ]) in the way. | ||
*[[Template:Pagetop]] - makes a link to the top of a page | |||
==Communicating with Users== | ==Communicating with Users== | ||
* [[Template:New Member]] - this will place (substitute) a welcome template on talk pages with the username of the editor who placed it there | *[[Template:New Member]] - this will place (substitute) a welcome template on talk pages with the username of the editor who placed it there | ||
* [[Template:Unsigned]] - for users who did not sign their comment on a talk page | *[[Template:Unsigned]] - for users who did not sign their comment on a talk page | ||
==Writing Templates== | ==Writing Templates== | ||
Wikipedia has many templates that can be used here. Templates can be written using the page title format ''Template:My template''. This template can then be used on a page using this notation: ''<nowiki>{{</nowiki>My template}}'' | Wikipedia has many templates that can be used here. Templates can be written using the page title format ''Template:My template''. This template can then be used on a page using this notation: ''<nowiki>{{</nowiki><nowiki>My template}}</nowiki>'' | ||
'''Documentation''': As on Wikipedia, documentation for templates can be written on the page: ''Template:My template/doc'', if the code ''<nowiki>{{</nowiki>Documentation}}'' has been included in the template. | '''Documentation''': As on Wikipedia, documentation for templates can be written on the page: ''Template:My template/doc'', if the code ''<nowiki>{{</nowiki><nowiki>Documentation}}</nowiki>'' has been included in the template. | ||
===Programming in Templates=== | ===Programming in Templates=== | ||
* [[Template:Qif]] - allows IF statements, similar to how they are used in programming languages | |||
* [[Template:Loop]] - from [http://en.wikipedia.org/wiki/Template:Loop Wikipedia], "This template is used to produce a simple loop that can repeat up to 150 times. It is not a real loop; it works by conditionally repeating the string." | *[[Template:Qif]] - allows IF statements, similar to how they are used in programming languages | ||
* [[Template:Pipe]] - used inside a template to produce a pipe: | | *[[Template:Loop]] - from [http://en.wikipedia.org/wiki/Template:Loop Wikipedia], "This template is used to produce a simple loop that can repeat up to 150 times. It is not a real loop; it works by conditionally repeating the string." | ||
* [http://en.wikipedia.org/wiki/Wikipedia:Anatomy_of_a_template Wikipedia:Anatomy of a template] | *[[Template:Pipe]] - used inside a template to produce a pipe: | | ||
*[http://en.wikipedia.org/wiki/Wikipedia:Anatomy_of_a_template Wikipedia:Anatomy of a template] | |||
==See Also== | ==See Also== | ||
* {{plainlink|url={{SERVER}}/w/index.php?title=Special%3AAllPages&from=&to=&namespace=10 Full list of all templates}} (system generated; Note that many templates are used for very specific group of articles and some templates have more complex uses) | |||
*{{plainlink|url={{SERVER}}/w/index.php?title=Special%3AAllPages&from=&to=&namespace=10 Full list of all templates}} (system generated; Note that many templates are used for very specific group of articles and some templates have more complex uses) | |||
[[Category:Help Pages]] | [[Category:Help Pages]] |