विकिपीडिया:टेम्पलेट बिबरनलेख: रिवीजन सभ के बीचा में अंतर

Content deleted Content added
छो Reverted edits by 122.161.107.231 (talk) to last version by Klilidiplomus
लाइन 18:
Documentation of any sort on a template page should always be enclosed by a {{nowrap|<code><nowiki>&lt;noinclude>…&lt;/noinclude></nowiki></code>}} container, so that it does not show up when the template is used on another page. Text on the template page itself adds to the amount of text that must be processed when displaying the template, which is [[Wikipedia:Template limits|limited]] for performance reasons. Placing the documentation in a subpage avoids this (MediaWiki developers have <span class="plainlinks">[http://en.wikipedia.org/w/index.php?title=Wikipedia:Village_pump_(technical)&diff=prev&oldid=69888944 recommended]</span> it for this reason).
 
==How to create a documentation subpage==
the corruption had to be stopped and the whole government has black money in the foregion accounts .
Template documentation subpages should be named and formatted using the following general pattern, for consistency.
.if the black money is bought to India , the corruption will go and poor people will not be poor anymore .
 
thank you
Suppose your template is named <code>Template:X</code>. Create a subpage with the name <code>Template:X/doc</code>. See the details at {{tl|Documentation subpage}} or copy-paste the following wikitext as a start for your documentation:
 
<!--This code block is copy-pasted from [[Template:Documentation/preload]];
check it periodically for updates and copy it here again if necessary,
and fix the "<include<includeonly></includeonly>only>" escaping in it.--><pre>
{{Documentation subpage}}
<!-- Categories and interwikis go at the bottom of this page. -->
 
== Usage ==
 
== See also ==
 
<includeonly>
<!-- Categories and interwikis go here: -->
 
</includeonly>
</pre>
 
The top line will display a message explaining the current page and a link to the template page.
 
Insert the documentation after the top line and categories and interwikis under the appropriate comment line – leaving the comment in place, so that the layout is preserved when the page is edited in future. The subpage template sets a <nowiki>{{DEFAULTSORT:{{PAGENAME}}}}</nowiki>, ensuring that a <code>Template:X</code> will be properly sorted at "X" and not "T", it is thus not useful or desirable to add a <nowiki>{{PAGENAME}}</nowiki> sortkey to the categories. Related templates, policy page, projects, etc. can be linked to under "See also", or just comment-out this section heading if it isn't needed (yet): <code><nowiki><!-- ==See also == --></nowiki></code>
 
Save the subpage and return to the template itself, <code>Template:X</code>, in this example. Edit the template and append the following at the end of the template code:
 
{{Colors|black|#CCC|{{var|[--last line of your template code--]}}}}<nowiki>&lt;noinclude>
 
{{Documentation}}
<!-- PLEASE ADD THIS TEMPLATE'S CATEGORIES AND INTERWIKIS TO THE /doc SUBPAGE, THANKS -->
&lt;/noinclude></nowiki>
 
This will transclude {{tl|Documentation}} at the bottom of the template page.
 
'''Important''': Make sure the opening <code><nowiki>&lt;noinclude></nowiki></code> begins on the same line as the last character of the template code or text and ''not'' on a new line. 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 [[Wikipedia:Administrators|administrator]] to do this or request an edit by using an {{tl2|Editprotected}} on the template's talk page. If documentation, categories and interwiki links already exist in a section, enclosed within a {{nowrap|<code><nowiki>&lt;noinclude>…&lt;/noinclude></nowiki></code>}} container, move them into the documentation subpage, as it is best not to have documentation split across two separate pages.
 
If the code is put on the template page first, one can benefit from the [[mw:Extension:InputBox#Parameters|preload]] feature to get a pre-filled doc page skeleton; if the documentation page does not exist yet, clicking the edit link on the template page will preload the contents of [[Template:Documentation/preload]] into the editbox of the /doc subpage creation.
 
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 <code>Template talk:X/doc</code> to <code>Template talk:X</code>.
 
==Categories and interwiki links==