ਵਿਕੀਪੀਡੀਆ:ਫਰਮਾ ਨੇਮਸਪੇਸ
[[Category:Wikipedia project content guidelines|]]
The Template namespace on Wikipedia is used to store templates, which contain Wiki markup intended for inclusion on multiple pages, usually via transclusion. Although the Template namespace is used for storing most templates, it is possible to transclude and substitute from other namespaces,[1] and so some template pages are placed in other namespaces, such as the User namespace. Templates help maintain consistent formatting and aid navigation between articles. They often include optional and/or variable elements controlled by parameters to allow for specialized use. Templates are also used to assist in a large variety of Wikipedia maintenance tasks. Each template has a matching A template is transcluded into another page by including a template tag in that page's content. A template tag contains the template page name surrounded by double curly braces, e.g. Internal links to template pages may be made by using the Guidelines
Suggested practicesReferencing templatesSometimes 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 Check the template documentation on Template:Tl for other options, such as {{tlb}} (bold), Template namesTemplate names can be made of one or more words, such as Sandbox for experimentsIf 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 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. ReadabilityFor 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 helps 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 breaksSome 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. SubstitutionInvoking a template using the form
(that is, inserting 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:. DocumentationBecause 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 {{(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. ModulesLua modules are sometimes used instead of templates to store reusable material. Reasons for this include usage of module-specific features such as loops or stored values, and complex code is often easier to read and maintain in a module. If a module is easily implementable in a template it generally should be, since there are more users with experience editing templates. If a module is intended to be used in articles or talk pages, a template wrapper should generally be created to simplify usage without directly requiring the There are sometimes reasons not to use a template wrapper, however, such as causing potential issues with template limits; a template wrapper that passes too many parameters to a module is much less efficient compared to a direct invocation. Additionally, it is generally not desirable to use template wrappers in other templates. HistoryHistorically, 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 templatesUse this form to search in the Template: or Template_talk: namespaces. See Help:Searching for more information. Pages which contain information on commonly used templates:
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
Notes
|
Portal di Ensiklopedia Dunia