WikiIslam:Templates: Difference between revisions

Jump to navigation Jump to search
m
mNo edit summary
Line 10: Line 10:


==Templates with Variables==
==Templates with Variables==
Templates that accept variables are a great way to let the software take care of formatting issues. For example if you're putting in a reference to a website, you can use the [[Template:Cite web|Cite web]] template. Just enter the URL, URL Title, author, publisher and archive URL and it will know how to format the output. So for example you wont have to worry about whether the author is mentioned first in that reference.
Templates that accept variables are a way to let the software take care of formatting issues. For example when putting in a reference to a website, the [[Template:Cite web|Cite web]] template can be used. All that is needed is the URL, URL Title, author, publisher and archive URL and it will automatically format the output. So, for example, editors would not have to worry about whether the author is mentioned first in that reference.


Using variables also makes sure that formatting remains consistent in all those occurrences of cite web. Otherwise if you do it manually, sometimes you may mention the author at the end of the rereference and at other times it may be in the beginning. Templates will make sure the output is consistent.
Using variables also makes sure that formatting remains consistent in all those occurrences of cite web. If the formatting was inputted manually, editors may place the author at the end of the reference and at other times place them at the beginning. Templates will make sure the output is consistent.


They also enable us to make system wide changes easily. The [[Template:Quran|Quran]] template also uses variables and has been updated multiple times when source websites had to be updated. System wide changes were made instantly which would be almost impossible to make if a template had not been used.
They also enable easy system-wide changes. The [[Template:Quran|Qur'an]] template also uses variables and has been updated multiple times when source websites had to be updated. System wide changes were made instantly which would be almost impossible to make if a template had not been used.


Any time you're formatting text in a certain way (for example: "''date, author - URL (website title)''"), that means it can usually be done through templates.
Any time an editor is formatting text in a certain way (for example: "''date, author - URL (website title)''"), that means it can usually be done through templates.
 
For an example of a template that uses a simple type of input and produces a different output, see: [[Template:Tabari]]


[[Template:Tabari]] is an example of a template that uses a simple type of input and produces a different output.


Here are some templates that can be used on the website.
Here are some templates that can be used on the website.
48,466

edits

Navigation menu