साँचा:Parameter names example/doc

मुक्त ज्ञानकोश विकिपीडिया से
< साँचा:Parameter names example
imported>Shivkarandholiya12 द्वारा परिवर्तित १९:२०, ३ अगस्त २०२१ का अवतरण (नया पृष्ठ: {{Documentation subpage}} {{Lua|Module:Parameter names example}} <!----Categories where indicated at the bottom of this page, please; interwikis at Wikidata (see Wikipedia:Wikidata)----> {{tl|Parameter names example}} – or, alternatively, {{tl|Generic template demo}} – is intended to assist template documentation by producing a generic instance of the template that uses Help:Templates#Parameters|parameters'...)
(अन्तर) ← पुराना अवतरण | वर्तमान अवतरण (अन्तर) | नया अवतरण → (अन्तर)
नेविगेशन पर जाएँ खोज पर जाएँ

{{

 साँचा:namespace detect

| type = notice | image = | imageright = | class = | style = margin-bottom:1.0em; | textstyle = | text = साँचा:strong for साँचा:terminate sentence
It contains usage information, categories and other content that is not part of the original साँचा page. | small = | smallimage = | smallimageright = | smalltext = | subst = | date = | name = }}

साँचा:tl – or, alternatively, साँचा:tl – is intended to assist template documentation by producing a generic instance of the template that uses parameters' names as those parameters' values. साँचा:clear

Example

The example opposite for साँचा:tl, for instance, was produced by:

{{{title}}}
{{{above}}}
{{{subheader}}}
{{{subheader2}}}
{{{image}}}
{{{caption}}}
{{{header1}}}
{{{label2}}}{{{data2}}}
{{{label3}}}{{{data3}}}
{{{header4}}}
{{{data5}}}
{{{data6}}}
{{{below}}}

साँचा:template other

{{Parameter names example
|_template=Infobox
|title |above |subheader |subheader2 |image |caption 
|header1 |label2 |data2 |label3 |data3 |header4 
|data5 |data6 |below
}}

Usage notes

When साँचा:tlf is used on an immediate subpage of its target template – e.g. on the target template's /doc page – its own साँचा:para parameter identifying the target template may be omitted. In other words, the code above, if used on Template:Infobox/page (where page could be "doc", "testcases", etc.), would become:

{{Parameter names example
|title |above |subheader |subheader2 |image |caption 
|header1 |label2 |data2 |label3 |data3 |header4 
|data5 |data6 |below
}}

One exception to this is the "sandbox" subpage. If the module is called from a page ending in "/sandbox", it uses that page to generate the template output, not the base page. To override this behaviour you can specify the साँचा:para parameter explicitly.

The formatting of the parameter names can be changed with the साँचा:para parameter. By default, the parameter names are shown in triple braces (the parameter standard, e.g. {{{name}}}साँचा:thin space), but if साँचा:para or साँचा:para is set, they are shown in italics.

A custom value for a parameter may be supplied by using साँचा:para in place of |[parameter name]. Any formatting for such a value – including, for instance, italics – must be supplied as part of the value (e.g. साँचा:para). Custom values cannot be used for parameters whose names begin with an underscore ("_").

See also