![]() | بو کؤمک صفحهسی بیر نئجه-ائتمک تعلیماتی دیر. بو، ویکیپدیا دا نئجه عمل ائتمک یا ویکیپدیانین بعضی قایدالاری و تجروبه اولونموش طرزلری حاقیندا معلومات وئریر. بو، ویکیپدیانین سیاست و یا تعلیماتلاریندان بیری دئییل، و موختلیف ایجماع و یوخلاما سویهلرینی عکس ائتدیره بیلر. |
شابلونلار مدیاویکی-نین چوخ گوجلو خوصوصیتیدیر، لاکین یئنی ایشلدنلر اوچون چاشقینلیق یارادا بیلر و حتا تجروبهلی ایشلدنلره داها مورکّب اولانلاری آنلاماغا چتینلیک چکه بیلرلر. بونا گوره ده ایستیفادهنی یاخشیلاشدیرماق اوچون شابلونلار بلگهلرله موشایعت اولونمالیدیر.
شابلون بلگهلری شابلونون نه ائتدییینی و اوندان نئجه ایستیفاده اولوناجاغینی توضیح ائتمهلیدیر. It should be simple enough that a user without complete knowledge of the intricacies of template syntax—which includes many experienced contributors who focus their attention elsewhere—can use it correctly. This is especially true in the case of very widely used templates.
Editors should defer to official policies or guidelines when template documentation pages are inconsistent with established community standards and principles. Editors should also avoid "quoting" template documentation pages as though they are policy—including this how-to guide. Template documentation pages can be written without much—if any—debate, as opposed to Wikipedia policies that have been thoroughly vetted by the community (see ویکیپدیا:فیکیر بیرلیگی for details).
شابلون بلگهلری آشاغیداکیلاری احاطه ائتمهلیدیر:
<code>...</code>
container, to make it clear and easy to copy, like this
. If the template can be used in several ways, with or without optional parameters, for example, provide a range of examples. A good way to do so is to transclude the template itself into the documentation a few times (i.e., use live examples), with different parameters each time and list the parameters used in each case. With {{Xpd}} this can be done without putting the template call twice in the wikitext.<noinclude>...</noinclude>
container on a template, or within <includeonly>{{Sandbox other||...}}</includeonly>
tags if placed on a documentation page. Many template categories are available, see: بؤلمه:ویکیپدیا شابلونلاری to browse through them.اینگیلیس ویکیپدیاسی یوزلرله آیری ویکیپدیا و باجی پروژهلر اوچون شابلون منبعییدیر. چوخ واخت شابلونلار تامامیله موستقیلدیر، بونا گؤره ده پروسس آساندیر: مضمون سادهجه دیگر ویکیدهکی یئنی شابلون صفحهسینه کوپیالانیر و هر شئی ایشلییر. بونونلا بئله، داها مورکّب شابلونلاردا شابلون ماژولو ایشه سالا، آیری شابلونلاری داخیل ائده، یالنیز آیریجه شابلونلا بیرلشدیریلدیکده ایشلهیه بیلر و یا ایشلهمک اوچون خصوصی سیاساس و یا جاوا اسکریپت کودو طلب اولونا بیلر. بو حاللاردا، بلگهلرین سونوندا شابلونلارین و یا بونون طلب ائتدیی دیگر کودلارین قیسا لیستینی علاوه ائتمک فایدالیدیر.
When viewing the rendered template page itself (as opposed to its wikicode), what is usually visible right under the title is the rendered template itself, followed by a separate section to display the template's rendered documentation, followed by the categories to which the template belongs. Categories and documentation of any sort on a template page (including TemplateData) should always be enclosed by noinclude tags, so that they do not show up when the template is used on another page.
The editable wikicode for the template's documentation is often placed on a separate subpage of the template itself, which is then transcluded at the end of the template page. This separates the often complex template code from the documentation, making the documentation easier to edit and reducing the number of accidental editing errors in the template code. It also allows templates to be protected where necessary, limiting editing access to important templates' code while allowing anyone to edit those templates' documentation. This method is sometimes referred to as the "template-doc page pattern".
شابلون یاراتارکن (درج ائدرکن) {{بلگهلهمه}} قویمالیسینیز. سونرا [باخ] [دییشدیر] [گئچمیش] [تمیزلهمه]
لینکلری ایله بلگهلهمه صفحهسی یارادیلیر. سیز بو پانلده [دییشدیر]
لینکینه کلیکلهمکله شابلون بلگهلهمهلرینی یارادا و دییشدیره بیلرسینیز.
Template documentation subpages using {{documentation}} are named and formatted using the following general pattern, for consistency.
Suppose your template is named Template:X
. Edit the template and append the following at the end of the template code, or use {{subst:doc-code}}:
[--last line of your template code--]<noinclude>
{{بلگهلهمه}}
<!-- Add categories to the /doc subpage and interwikis in Wikidata, not here! -->
</noinclude>
This will transclude {{documentation}} at the bottom of the template page.
Important: Make sure the opening <noinclude>
begins immediately after the last character of the template code or text and not on a new line, nor with any intervening spaces. Otherwise, extra space will be inserted below the template when it is used, which is usually not wanted.
If the template is already protected, ask an administrator to do this or request an edit by using an {{edit protected}} on the template's talk page. If documentation and categories already exist in a section, enclosed within a <noinclude>...</noinclude>
container, move them into the documentation subpage (where they should be enclosed in <includeonly>...</includeonly>
), as it is best not to have documentation split across two separate pages.
Use [create]
link at the bottom of the empty documentation box to automatically create a preloaded documentation subpage. Insert the documentation after the top line and categories under the appropriate comment line – leaving the comment in place, so that the layout is preserved when the page is edited in future. Related templates, policy page, projects, etc. can be linked to by adding a "See also" section. Save the subpage.
To create the documentation subpage manually, create a subpage with the name Template:X/doc
. See the details at {{Documentation subpage}} or start the page by copy-pasting the following standard wikitext:
{{بلگهنین آلت صفحهسی}}
<!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata -->
== ایستیفادهسی ==
<includeonly>{{Sandbox other||
<!-- Categories below this line; interwikis at Wikidata -->
}}</includeonly>
The top line will display a message explaining the current page and a link to the template page. Save the subpage and follow instructions in section "Use Template:Documentation".
Instead of manually writing a lead graf and a usage table, the {{Format TemplateData}} template can do most of the job. Simply write your TemplateData in the table interface, and then wrap it into a template call like {{Format TemplateData|1=<templatedata>...</templatedata>}}
at the top of the page.
You may wish to redirect the talk page of the /doc subpage to the talk page of the template itself. Then all talk relating to the template and its documentation will end up on the same talkpage. For example, redirect Template talk:X/doc
to Template talk:X
.
A documentation page can also be redirected to the /doc subpage of another template, if that covers the usage for both templates. In this case, clicking the links to view or edit the documentation will directly open the target of the redirect. If it is necessary to access the redirect itself (e.g. to remove the redirect and create a separate doc page), go to the template URL by clicking in the location bar at the top of your browser, and add /doc at the end.
To generate a blank template, which may then be copied from the documentation and pasted into another page, use:
{{subst:#tag:pre|{{subst:Parameters|code|base={{subst:BASEPAGENAME}}}}|style=overflow: auto;}}
To generate an instance of the template, populated with its own property names, use:
{{subst:Parameters|demo|base={{subst:BASEPAGENAME}}|_base=}}
[[Category:Category name]]
code inside an <includeonly>...</includeonly>
section on the doc subpage.[[Category:Category name]]
code inside a <noinclude>...</noinclude>
section on the doc subpage.[[Category:Category name]]
code inside an <includeonly>...</includeonly>
section on the template page. Exact placement within the template code may affect how the category code is executed.Before doing changes to a template it can be good to first copy the template code to a sandbox and run some testcases, since the template might be visible on thousands or even millions of pages. If you create subpages named exactly "/sandbox" and "/testcases" to a template then the green {{documentation}}
box on the template auto-detects this and will show links to those pages in its header. See Wikipedia:Template sandbox and test cases for more information.
When several templates work together or are very similar then it is often clearer and easier to maintain one single documentation page that documents them together. The simplest way to do this is to make a full documentation page at one of the templates, and then make "soft redirects" from the other templates. See, for instance: {{wrap}}.
When a documentation subpage has not been created, and the {{documentation}}
template is being used with a |content=
parameter on the actual template page, then to place the template itself into a category, add شابلون:Elc inside the documentation template, after the content. For example, for placement on the actual template page:
<!--Last line of your template code--><noinclude>
{{بلگهلهمه
| content =
<!-- template documentation -->
[[Category:Category name]]
[[Category:Category name2]]
}}</noinclude>
When a template as displayed will link to a page that can serve as the documentation, then separate documentation is superfluous and does not need to be created. For instance, a stub template, using the {{asbox}} template as a base, will already display pre-loaded common documentation for all stub templates using that template, and will not need additional documentation.
Here are some tips to facilitate writing documentations:
<ref group="note">...</ref>
can be easily inserted with {{tag}}. This example is written as {{tag|ref|params=group="note"}}<nowiki />
tag. [[<nowiki />
example]] becomes [[example]], and [<nowiki />
http://en.wikipedia.org no link] is [http://en.wikipedia.org no link]. See ویکیپديا:ویکیلشدیرمه for the details.<includeonly>{{Sandbox other||{{Testcases other||
<!-- Categories below this line, please; interwikis at Wikidata -->
}}}}</includeonly>
{{Some infobox (child) template
| child = <includeonly>yes</includeonly>
| label1 = Hello
| data1 = World
}}<noinclude>{{بلگهلهمه}}</noinclude>
<noinclude>
and <includeonly>