Contents 1 Guidelines 2 Suggested practices 2.1 Referencing templates 2.2 Template names 2.3 Sandbox for experiments 2.4 Readability 2.5 Line breaks 2.6 Substitution 2.7 Documentation 3 History 4 Searching for templates 5 See also 6 Notes


Guidelines[edit] Shortcuts WP:TG WP:TMPG Further information: Wikipedia:Be bold § Template namespace Templates should not normally be used to store article text, as this makes it more difficult to edit the content. They should also not be used to "collapse" or "hide" content from the reader. Templates used in articles are designed to provide information to assist readers, such as navigation aids, formatting, or warnings that content is sub-standard. Templates that provide information only of service to editors should not appear on article pages - use the article's talk page or other non-article namespaces. Template function should be clear from the template name, but redirects can be created to assist everyday use of very popular templates. High-risk templates should be semi-protected, template protected, or fully protected as appropriate (see Wikipedia:Protection policy). This applies also to any high-use template redirects. Templates should be clearly documented as to their usage and scope. Templates should not be used to create lists of links to other articles when a category, list page, or "See also" section list can perform the same function. Templates for short, temporary messages that will be removed quickly (such as on User_talk: pages) or that contain text which is not likely to ever be changed should be invoked with substitution (subst:). Typical templates that are intended for long-term use and are likely to require changes should be transcluded for easy future updates. Templates that violate the guidelines on this page, have poorly-defined function, are redundant, become orphaned or used on only one page, or violate other Wikipedia policies may be nominated for deletion at Wikipedia:Templates for discussion. Templates that misrepresent policy or substantially duplicate or hardcode the same functionality of established templates may fit the criteria for speedy deletion.


Suggested practices[edit] Referencing templates[edit] Sometimes you will want to refer to a template, rather than actually invoking it. An easy way to do this is to call Template:Tl (short for "template link"). For example, to reference the Cleanup template, typing {{tl|Cleanup}} results in {{Cleanup}}. You can also add parameters using Template:Tlp; for example, {{tlp|Convert|1|m}} displays as {{Convert|1|m}}. If you'd like your reference to stand out more, check the template documentation on Template:Tl for other options, such as {{tlb}} (bold), {{tlx}} (code), {{tlxb}} (bold & code), {{tlxi|param1|param2}} (italic parameters), and many more. Template names[edit] Shortcut WP:TPN Template names can be made of one or more words, such as {{Train topics}}. The first character (only) is not case-sensitive, so {{cleanup}} and {{Cleanup}} are the same template, but {{cfd}} and {{cfD}} are not. Template names are easiest to remember if they follow standard English spelling, spacing, and capitalization (also see the naming conventions for articles). Avoid having templates whose names differ only in case, spacing, or punctuation. Sandbox for experiments[edit] Main article: Wikipedia:Template sandbox and test cases If you wish to experiment with templates (and not have your experiments deleted before you are done with them), you may do so in the Template sandbox. You may also use the templates X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, and X12 for experimental purposes. To include a test template, use the form {{X1}} for template X1, {{X2}} for template X2, etc. Existing templates often each have their own sandbox and test case pages (especially those that use {{Documentation}}). Changes should be thoroughly tested there before being applied to the main template, in order to prevent unintentional damage to many pages. Readability[edit] For templates that use a large number of parameters, it can be helpful to place each parameter on a separate line and align the equals signs. This help future editors to more easily read the wikicode. {{Example template name | first_parameter = Text of first_value | second_parameter = Text of second_value | third_parameter = Text of third_parameter | etc = etc }} Line breaks[edit] Some templates may accidentally cause extra line breaks in the rendered articles. This is especially true of infobox templates and other template boxes that usually float on the right side of an article, since the additional lines will not be seen on the template page. For more information, see Wikipedia:Line-break handling. As a general guideline, avoid two line breaks together in your template. These may "add up" with other line breaks in the article and be displayed as unwanted white space. Substitution[edit] Main article: Wikipedia:Substitution Invoking a template using the form {{subst:name of template (|parameters |...)}} (that is, inserting subst: immediately after the opening pair of curly brackets) will make a copy of the template text and place it on the page, where it will be viewable in the source. The template is no longer transcluded and future changes to the template will not change the text. As a guideline, this method should be used for any short, temporary messages which are removed quickly, such as on User_talk: pages. The standard new user {{Welcome}} message is a good example. Use subst: also if you need to edit the message after including it on the page. If you don't need to edit it, and would rather the message is automatically updated along with changes made to the template, don't use subst:. Documentation[edit] Main article: Wikipedia:Template documentation Because templates represent a step up in difficulty for the novice editor, documentation should be provided which describes its usage (optional parameters) and scope (where it should be used). There are two different ways to do this: One alternative is to use <noinclude> to add a minor description direct into the template, for example: '''This is a {{{1}}} article.'''<noinclude> Place this template on any article that requires description. It takes one parameter, an adjective used to describe the article. For example, {{article-describe|bad}} produces the text, '''This is a bad article.''' </noinclude> Another alternative is to create a formal /doc subpage for the documentation (preferred for templates with multiple parameters, etc.) and add <noinclude>{{Documentation}}</noinclude> after the actual template. The first "noinclude" tag should be placed on the same line as the end braces of the actual template in the following manner: {{(template name) (piped parameters) }}<noinclude>... If the "noinclude" tag starts on the line below the template's closing braces, then unwanted whitespace is introduced at the bottom of the template when it is used in articles and on other pages.


History[edit] Historically, an "msg:" prefix had to be added in front of the template name when it was used on a page. For example, {{msg:stub}} was typed instead of {{stub}}. This is no longer necessary. In Wikipedia's first 35 months, there was no template or transclusion mechanism at all. The page Wikipedia:Boilerplate text was created in September 2002 to collect frequently used text in various Wikipedia processes. The MediaWiki namespace was introduced with MediaWiki 1.2.6 on December 6, 2003, and was used not only for the user interface but also for creating boilerplate text messages to be inserted in articles using the {{msg: ...}} syntax. This function was replaced with the Template namespace during the software upgrade to MediaWiki 1.3 on May 30, 2004. As a function of the "Template namespace initialisation script", all non-system messages were moved to the new namespace. The initialisation script also replaced MediaWiki: references in articles with Template: to bypass the redirects created by the moves. For a short time, Wikipedia:Articles for deletion (then known as votes for deletion or VfD) used MediaWiki: messages named in the format "MediaWiki:VfD-articlename". These were moved to the Template: space in June 2004 and were named "Template:VfD-articlename". This usage is deprecated now in favor of subpages. Around 2005, growing complexity of template functions and the desire to consolidate similar templates led to the creation of extremely complex conditional hacks such as nested templates and CSS tricks. These undesirable methods led to the development of m:Extension:ParserFunctions, added in 2006 with MediaWiki 1.7. By 2009, many problems with template readability and complexity still remained (On templates and programming languages). In 2013, in order to address page load times, mostly due to slow template renders, Lua was enabled, creating a Module: namespace for programmers to make use of (New Lua templates bring faster, more flexible pages to your wiki).


Searching for templates[edit] Use this form to search in the Template: or Template_talk: namespaces. See Help:Searching for more information. Template Template_talk Pages which contain information on commonly used templates: Wikipedia:Template messages for an index of text-based templates. Wikipedia:Navigation templates for a partial list of various subject-class navigational elements. Wikipedia:List of infoboxes for infoboxes, which are small panels that summarize key features of the page's subject. Wikipedia:Categorization for templates used for categories Wikipedia:Citation templates for templates used to format article references and citations If you're unable to find an existing template for your situation, but don't feel comfortable creating one yourself, you can ask for help at Wikipedia:Requested templates.


See also[edit] Help:Template for information on developing templates and syntax details Help:Magic words for all template modifiers Wikipedia:Conditional tables Wikipedia:Template standardisation


Notes[edit] ^ Namespaces from which transclusion is not allowed are specified on a wiki by the variable $wgNonincludableNamespaces v t e Wikipedia key policies and guidelines Five pillars What Wikipedia is not Ignore all rules Content Verifiability No original research Neutral point of view What Wikipedia is not Biographies of living persons Image use Wikipedia is not a dictionary Article titles Notability Autobiography Citing sources Identifying reliable sources medicine Do not include copies of primary sources Plagiarism Don't create hoaxes Fringe theories Patent nonsense External links Conduct Civility Consensus Editing policy Harassment Vandalism Ignore all rules No personal attacks Ownership of content Edit warring Dispute resolution Sock puppetry No legal threats Child protection Paid-contribution disclosure Assume good faith Conflict of interest Disruptive editing Do not disrupt Wikipedia to illustrate a point Etiquette Gaming the system Please do not bite the newcomers Courtesy vanishing Deletion Deletion policy Proposed deletion Criteria for speedy deletion Attack page Oversight Proposed deletion of BLP Proposed deletion (books) Revision deletion Enforcement Administrators Banning Blocking Page protection Editing Article size Be bold Disambiguation Hatnotes Set index articles Subpages User pages Talk page guidelines Signatures Broad-concept article Project namespace WikiProjects Style Manual of Style Contents Accessibility Understandability Dates and numbers Images Layout Lead section Linking Lists Classification Categories, lists, and navigation templates Categorization Template namespace WMF List of policies Friendly space policy Licensing and copyright Privacy policy Values FAQ List of all policies and guidelines List of policies List of guidelines Lists of attempts in creating fundamental principles v t e Template messages Main namespace General Cleanup Disputes Hatnotes Infoboxes Links External link templates Linking country articles Lists Main page Section Sources of articles Standard boxes Stub types Translation Other namespaces Compact TOC Category File Talk Template User Userboxes User talk Wikipedia WikiProject banners All namespaces Deletion Formatting Maintenance Merging Moving Navigation Redirect pages Functional index Splitting Wikimedia sister projects Navboxes with templates Archive Articles for deletion Birth, death and age Button Category header Citation and verifiability Citation Style 1 Deletion review Editnotice Hatnotes Help desk Inline cleanup Introduction cleanup IPA Math Notice and warnings Organization infoboxes Proposed article mergers Protection Quotation Redirects Search Semantics Speedy deletion Notices String-handling Sup and sub-related Top icon Transwiki maintenance Unicode User Talk Pages User noticeboard notices Userboxes User rights Userspace linking Userspace Disclaimers Wikibreak WikiLove Related topics Template documentation Examples of templates Maintenance template removal Requested templates WikiProject Templates Template help Template namespace Search Category Retrieved from "https://en.wikipedia.org/w/index.php?title=Wikipedia:Template_namespace&oldid=824017651" Categories: Wikipedia guidelinesWikipedia templatesWikipedia how-toWikipedia featuresWikipedia guidelines for templates


Navigation menu Personal tools Not logged inTalkContributionsCreate accountLog in Namespaces Project pageTalk Variants Views ReadEditView history More Search Navigation Main pageContentsFeatured contentCurrent eventsRandom articleDonate to WikipediaWikipedia store Interaction HelpAbout WikipediaCommunity portalRecent changesContact page Tools What links hereRelated changesUpload fileSpecial pagesPermanent linkPage informationWikidata item Print/export Create a bookDownload as PDFPrintable version In other projects Wikispecies Languages العربيةবাংলাفارسی한국어IlokanoمصرىSimple EnglishسنڌيSlovenščinaاردوייִדיש中文 Edit links This page was last edited on 4 February 2018, at 20:51. Text is available under the Creative Commons Attribution-ShareAlike License; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization. Privacy policy About Wikipedia Disclaimers Contact Wikipedia Developers Cookie statement Mobile view (window.RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgPageParseReport":{"limitreport":{"cputime":"0.196","walltime":"0.267","ppvisitednodes":{"value":2099,"limit":1000000},"ppgeneratednodes":{"value":0,"limit":1500000},"postexpandincludesize":{"value":100550,"limit":2097152},"templateargumentsize":{"value":1430,"limit":2097152},"expansiondepth":{"value":9,"limit":40},"expensivefunctioncount":{"value":5,"limit":500},"entityaccesscount":{"value":0,"limit":400},"timingprofile":["100.00% 176.059 1 -total"," 24.43% 43.011 9 Template:Navbox"," 22.88% 40.283 1 Template:Guideline"," 21.43% 37.727 1 Template:Ombox"," 15.47% 27.232 2 Template:For"," 13.89% 24.457 1 Template:Wikipedia_policies_and_guidelines"," 12.19% 21.468 3 Template:Shortcut"," 9.66% 17.004 3 Template:Tlg"," 7.37% 12.978 1 Template:Tlb"," 7.08% 12.470 1 Template:Wikipedia_template_messages"]},"scribunto":{"limitreport-timeusage":{"value":"0.055","limit":"10.000"},"limitreport-memusage":{"value":2502177,"limit":52428800}},"cachereport":{"origin":"mw1326","timestamp":"20180218173536","ttl":1900800,"transientcontent":false}}});});(window.RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgBackendResponseTime":88,"wgHostname":"mw1333"});});


Wikipedia:Template_namespace - Photos and All Basic Informations

Wikipedia:Template_namespace More Links

Help:A Quick Guide To TemplatesHelp:TemplateWikipedia:Policies And GuidelinesWikipedia:What "Ignore All Rules" MeansWikipedia:Ignore All RulesWikipedia:ConsensusWikipedia Talk:Template NamespaceWikipedia:ShortcutWikipedia:What Is An Article?Wikipedia:AdministrationWikipedia:NamespaceWikipedia:NamespaceHelp:Using Talk PagesWikipedia:What Is An Article?Wikipedia:User PagesWikipedia:Project NamespaceHelp:FilesHelp:MediaWiki NamespaceWikipedia:Help NamespaceHelp:CategoryWikipedia:PortalWikipedia:BooksWikipedia:DraftsWikipedia:Course PagesWikipedia:LuaWikipedia:GadgetWikipedia:GadgetWikipedia:NamespaceHelp:Special PageHelp:FilesHelp:TemplateHelp:Wiki MarkupWikipedia:TransclusionWikipedia:User NamespaceHelp:TemplateWikipedia:MaintenanceHelp:Using Talk PagesWikipedia:Page NameWikipedia:ShortcutWikipedia:Be BoldWikipedia:What Is An Article?Wikipedia:Manual Of StyleWikipedia:RedirectsWikipedia:High-risk TemplatesWikipedia:Template EditorWikipedia:Protection PolicyWikipedia:Categories, Lists, And Navigation TemplatesWikipedia:Categories, Lists, And Navigation TemplatesWikipedia:See AlsoWikipedia:Templates For DiscussionWikipedia:T2Wikipedia:T3Wikipedia:Criteria For Speedy DeletionTemplate:TlTemplate:CleanupTemplate:TlpTemplate:ConvertTemplate:TlTemplate:TlbTemplate:TlxTemplate:TlxbTemplate:TlxiWikipedia:ShortcutWikipedia:Naming ConventionsWikipedia:Template Sandbox And Test CasesTemplate:Template SandboxTemplate:X1Template:X2Template:X3Template:X4Template:X5Template:X6Template:X7Template:X8Template:X9Template:X10Template:X11Template:X12Wikipedia:Template Sandbox And Test CasesTemplate:DocumentationWikipedia:Infobox TemplatesWikipedia:Line-break HandlingWikipedia:SubstitutionTransclusionTemplate:WelcomeWikipedia:Template DocumentationWikipedia:DOCTemplate:DocumentationWikipedia:Boilerplate TextHelp:MediaWiki NamespaceUser:Template Namespace Initialisation ScriptWikipedia:Articles For DeletionWikipedia:Avoid Using Meta-templatesWikipedia:HiddenStructureWikipedia:LuaHelp:SearchingWikipedia:Template MessagesWikipedia:Navigation TemplatesWikipedia:List Of InfoboxesWikipedia:CategorizationHelp:CategoryWikipedia:Citation TemplatesWikipedia:Citing SourcesWikipedia:Requested TemplatesHelp:TemplateHelp:Magic WordsWikipedia:Conditional TablesWikipedia:Template StandardisationTemplate:Wikipedia Policies And GuidelinesTemplate Talk:Wikipedia Policies And GuidelinesWikipedia:Policies And GuidelinesWikipedia:Five PillarsWikipedia:What Wikipedia Is NotWikipedia:Ignore All RulesWikipedia:VerifiabilityWikipedia:No Original ResearchWikipedia:Neutral Point Of ViewWikipedia:What Wikipedia Is NotWikipedia:Biographies Of Living PersonsWikipedia:Image Use PolicyWikipedia:Wikipedia Is Not A DictionaryWikipedia:Article TitlesWikipedia:NotabilityWikipedia:AutobiographyWikipedia:Citing SourcesWikipedia:Identifying Reliable SourcesWikipedia:Identifying Reliable Sources (medicine)Wikipedia:Do Not Include The Full Text Of Lengthy Primary SourcesWikipedia:PlagiarismWikipedia:Do Not Create HoaxesWikipedia:Fringe TheoriesWikipedia:Patent NonsenseWikipedia:External LinksWikipedia:CivilityWikipedia:ConsensusWikipedia:Editing PolicyWikipedia:HarassmentWikipedia:VandalismWikipedia:Ignore All RulesWikipedia:No Personal AttacksWikipedia:Ownership Of ContentWikipedia:Edit WarringWikipedia:Dispute ResolutionWikipedia:Sock PuppetryWikipedia:No Legal ThreatsWikipedia:Child ProtectionWikipedia:Paid-contribution DisclosureWikipedia:Assume Good FaithWikipedia:Conflict Of InterestWikipedia:Disruptive EditingWikipedia:Do Not Disrupt Wikipedia To Illustrate A PointWikipedia:EtiquetteWikipedia:Gaming The SystemWikipedia:Please Do Not Bite The NewcomersWikipedia:Courtesy VanishingWikipedia:Deletion PolicyWikipedia:Proposed DeletionWikipedia:Criteria For Speedy DeletionWikipedia:Attack PageWikipedia:OversightWikipedia:Proposed Deletion Of Biographies Of Living PeopleWikipedia:Proposed Deletion (books)Wikipedia:Revision DeletionWikipedia:AdministratorsWikipedia:Banning PolicyWikipedia:Blocking PolicyWikipedia:Protection PolicyWikipedia:Article SizeWikipedia:Be BoldWikipedia:DisambiguationWikipedia:HatnoteWikipedia:Set Index ArticlesWikipedia:SubpagesWikipedia:User PagesWikipedia:Talk Page GuidelinesWikipedia:SignaturesWikipedia:Broad-concept ArticleWikipedia:Project NamespaceWikipedia:WikiProject Council/GuideWikipedia:Manual Of StyleWikipedia:Manual Of Style/ContentsWikipedia:Manual Of Style/AccessibilityWikipedia:Make Technical Articles UnderstandableWikipedia:Manual Of Style/Dates And NumbersWikipedia:Manual Of Style/ImagesWikipedia:Manual Of Style/LayoutWikipedia:Manual Of Style/Lead SectionWikipedia:Manual Of Style/LinkingWikipedia:Manual Of Style/ListsWikipedia:Categories, Lists, And Navigation TemplatesWikipedia:CategorizationWikipedia:List Of Policies And GuidelinesWikipedia:List Of PoliciesWikipedia:List Of GuidelinesWikipedia:PrinciplesTemplate:Wikipedia Template MessagesTemplate Talk:Wikipedia Template MessagesWikipedia:Template MessagesWikipedia:What Is An Article?Wikipedia:Template Messages/GeneralWikipedia:Template Messages/CleanupWikipedia:Template Messages/DisputesWikipedia:HatnoteWikipedia:List Of InfoboxesWikipedia:Template Messages/LinksCategory:External Link TemplatesWikipedia:Inline Templates Linking Country ArticlesWikipedia:Template Messages/ListsWikipedia:Template Messages/Main Page And AlternativesWikipedia:Template Messages/SectionWikipedia:Template Messages/Sources Of ArticlesWikipedia:Template Messages/Standard BoxesWikipedia:WikiProject Stub Sorting/Stub TypesWikipedia:Template Messages/TranslationWikipedia:NamespaceWikipedia:Template Messages/Compact Tables Of ContentsWikipedia:Template Messages/Category NamespaceWikipedia:Template Messages/File NamespaceWikipedia:Template Messages/Talk NamespaceWikipedia:Template Messages/Template NamespaceWikipedia:Template Messages/User NamespaceWikipedia:UserboxesWikipedia:Template Messages/User Talk NamespaceWikipedia:Template Messages/Wikipedia NamespaceWikipedia:Template Messages/WikiProject BannersWikipedia:Template Messages/DeletionWikipedia:Template Messages/FormatWikipedia:Template Messages/MaintenanceWikipedia:Template Messages/MergingWikipedia:Template Messages/MovingWikipedia:Navigation TemplateWikipedia:Template Messages/Redirect PagesTemplate:R Template IndexWikipedia:Template Messages/SplittingWikipedia:Template Messages/Sister ProjectsTemplate:WarchivenavTemplate:Afd See Also DocumentationTemplate:Birth, Death And Age TemplatesTemplate:Button TemplatesTemplate:Other Category-header TemplatesTemplate:Citation And Verifiability Article Maintenance TemplatesTemplate:Citation Style 1Template:DRV See Also DocumentationTemplate:Editnotice TemplatesTemplate:Hatnote TemplatesTemplate:Help Desk Templates NavboxTemplate:Inline Cleanup TagsTemplate:Introduction Cleanup Maintenance TemplatesTemplate:IPA TemplatesTemplate:Math TemplatesTemplate:Notice And Warning TemplatesTemplate:Organization InfoboxesTemplate:Pam See Also DocumentationTemplate:Protection TemplatesTemplate:Quotation TemplatesTemplate:R Template IndexTemplate:Search TemplatesTemplate:Semantic Markup TemplatesTemplate:Speedy Deletion NavboxTemplate:Speedy Deletion NoticesTemplate:String-handling TemplatesTemplate:Sup And Sub-related TemplatesTemplate:Top Icon TemplatesTemplate:Transwiki MaintenanceTemplate:Unicode TemplatesTemplate:User Talk PagesTemplate:User Noticeboard NoticesTemplate:WP:UBSTemplate:User Rights TemplatesTemplate:Userspace Linking TemplatesTemplate:Userspace DisclaimersTemplate:Wikibreak TemplatesTemplate:WikiLove See AlsoWikipedia:Template DocumentationWikipedia:Template Messages/ExamplesHelp:Maintenance Template RemovalWikipedia:Requested TemplatesWikipedia:WikiProject TemplatesHelp:TemplateCategory:Wikipedia TemplatesHelp:CategoryCategory:Wikipedia GuidelinesCategory:Wikipedia TemplatesCategory:Wikipedia How-toCategory:Wikipedia FeaturesCategory:Wikipedia Guidelines For TemplatesDiscussion About Edits From This IP Address [n]A List Of Edits Made From This IP Address [y]View The Project Page [c]Discussion About The Content Page [t]Edit This Page [e]Visit The Main Page [z]Guides To Browsing WikipediaFeatured Content – The Best Of WikipediaFind Background Information On Current EventsLoad A Random Article [x]Guidance On How To Use And Edit WikipediaFind Out About WikipediaAbout The Project, What You Can Do, Where To Find ThingsA List Of Recent Changes In The Wiki [r]List Of All English Wikipedia Pages Containing Links To This Page [j]Recent Changes In Pages Linked From This Page [k]Upload Files [u]A List Of All Special Pages [q]Wikipedia:AboutWikipedia:General Disclaimer



view link view link view link view link view link