WikiIslam:Templates: Difference between revisions

no edit summary
No edit summary
Line 7: Line 7:


Just like a regular page, links to a template page (like we have made on this page) can be made using square brackets, for example <nowiki>[[</nowiki>Template:Stub]] produces: [[Template:Stub]]
Just like a regular page, links to a template page (like we have made on this page) can be made using square brackets, for example <nowiki>[[</nowiki>Template:Stub]] produces: [[Template:Stub]]
==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.
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.
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.
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.


Here are some templates that can be used on the website.
Here are some templates that can be used on the website.
Autochecked users, Bureaucrats, Editors, oversight, recentchangescleanup, Reviewers, rollback, Administrators
19,746

edits