साचा:Redirect template/doc

विकिपीडिया, मुक्‍त ज्ञानकोशातून
Jump to navigation Jump to search

This is a मेटा साचा for standardising redirect category (rcat) templates. The message produced by this template is intended to be transcluded to redirect pages via rcats.

When transcluded into the namespace indicated by a parameter, it categorises that page according to the parameter.

वापर[संपादन]

Only use this template in redirect category templates that are used to tag hard (never soft) redirects.

The usual links that are present on a redirect page are the link to the target page, and category and interwiki links that apply to the redirect.

This template should be used once in an rcat, such as the very basic:

{{Redirect template}}

प्राचले[संपादन]

All the parameters should be used, except only one of either |from= or |to= needs to be used (both can be used) and |printworthy=(yes or no) should be used when appropriate.

The parameter |name=From example adds the text "From example:" before "This is a redirect...". The text "From example" will be automatically linked to the redirect maintenance category that is populated by the |category= parameter.

The parameter |from=another example adds the text "from another example." after "This is a redirect". The parameter |to=a third example adds the text "to a third example." after "This is a redirect" (or after the from parameter's text if that is also used). Note that the full stop (period) is automatically placed at the end of the sentence, so if a full stop is typed in, then two full stops will appear at the end of the sentence. Please be mindful of this.

The parameter |info=This is extra information. produces the text "This is extra information." after the first sentence, allowing extra information about the type of redirect to be displayed, if necessary. Too much extra information should be avoided, as it can be included on the corresponding category page instead. In the |info= parameter, the full stop (period) is not automatic and must be typed in at the end of the sentence.

The category parameters add pages with redirect templates using this template to categories. Use the parameter for the namespace the template will be used in:

  • |main category=Redirects from examples
  • |help category=
  • |portal category=
  • |talk category= (for all talk namespaces)
  • |template category=
  • |wikipedia category=
  • |user category=
  • |all category= will add the specified category to redirect pages in any namespace.
  • Parameters for other namespaces can be handled after this template. An example is {{R to draft namespace}} where the {{Draft other}} template is used to populate वर्ग:Redirects to the draft namespace.

A namespace parameter can be used in conjunction with |other category=. This parameter will add its category to pages in any namespace other than the specified namespace parameter's category.

The parameter |printworthy= (valid only for {{Redirect template}}, not for {{Redirect template/core}}) will categorise main namespace pages into वर्ग:Printworthy redirects or to वर्ग:Unprintworthy redirects depending on whether the parameter equals "yes" or "no", respectively.

उदाहरण[संपादन]

{{Redirect template
  |name=From an initialism
  |from=an initialism
  |to=a related topic, such as the expansion of the initialism
  |main category=Redirects from initialisms
}}<noinclude>
<!-- Place categories on /doc subpage; interwikis go to Wikidata. -->
{{Documentation}} 
</noinclude>

Used individually as in {{R from initialism}} this produces: साचा:R from initialism


Used with the {{Redirect category shell}} or {{This is a redirect}} template this produces:

साचा:Rcat shell

Note: Both the Redirect category shell and template This is a redirect detect protection levels – in this example the fact that this template, Redirect template, is template protected is automatically sensed and displayed. That protection notice will not appear when the documentation page is viewed, because that page is not protected from editing.

चुकीचा वापर[संपादन]

When an rcat equipped with this template tags a redirect in the wrong namespace, the following notice will be applied by the {{Incorrect redirect template}} and will appear on the redirect page (it does appear when the edit is "previewed", so the rcat can be removed before the edit is actually saved):

where {{{1}}} is replaced by a link to the namespace specified by the rcat.

Also, the redirect will not populate the expected category of the rcat. If saved with the rcat, then the incorrectly tagged redirect will populate वर्ग:Pages with templates in the wrong namespace, instead.

वापराची टिप्पणी[संपादन]

It was found at {{R from fictional character}} and {{R from IMO number}} that parser functions, {{#if:...}} {{#ifeq:...}}, etc., when used within this template may yield unexpected results and undesired text on redirects. If parameters and such are wanted in an rcat, then test the results in the sandbox before actually going "live". If anomalies are noted, then place the parser function(s) outside (usually below) the Redirect template and enclose it/them inside <includeonly> </includeonly> tags.

हेही बघा[संपादन]
https://mr.wikipedia.org/wiki/%E0%A4%B8%E0%A4%BE%E0%A4%9A%E0%A4%BE:Redirect_template/doc
mr.wikipedia.org
crawl=CC-MAIN-2019-51
104380
application/http; msgtype=response
sha1:FVZVNT43OKDGZYZQ2EIFLA42I7FSVA2S
<urn:uuid:66de0cd7-b3fc-481a-af0c-664f87c33ef9>
2019-12-05T15:45:00Z
208.80.154.224
text/html
sha1:LA3GZCGDHBSX6CQNXWTR4AZWFQDWLBS5
<urn:uuid:51557a68-bdf3-4574-9cc5-df42cf62e645>
https://mr.wikipedia.org/wiki/%E0%A4%B8%E0%A4%BE%E0%A4%9A%E0%A4%BE:Redirect_template/doc
response
<urn:uuid:b4613d97-1db7-44ed-9fa9-d7ffb35ae949>
isPartOf: CC-MAIN-2019-51
publisher: Common Crawl
description: Wide crawl of the web for December 2019
operator: Common Crawl Admin (info@commoncrawl.org)
hostname: ip-10-67-67-207.ec2.internal
software: Apache Nutch 1.16 (modified, https://github.com/commoncrawl/nutch/)
robots: checked via crawler-commons 1.1-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)
format: WARC File Format 1.1
conformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/