Predloga:Parameter names example
| Uporablja Lua: |
{{Parameter names example}} – or, alternatively, {{Generic template demo}} – is intended to assist template documentation by producing a generic instance of the template that uses parameters' names as those parameters' values.
Example
The example opposite for {{Infobox}}, for instance, was produced by:
| {{{above}}} | |
|---|---|
| {{{subheader}}} | |
| {{{subheader2}}} | |
| {{{image}}} {{{caption}}} | |
| {{{header1}}} | |
| {{{label2}}} | {{{data2}}} |
| {{{label3}}} | {{{data3}}} |
| {{{header4}}} | |
| {{{data5}}} | |
| {{{data6}}} | |
| {{{below}}} | |
{{Parameter names example
|_template=Infobox
|title |above |subheader |subheader2 |image |caption
|header1 |label2 |data2 |label3 |data3 |header4
|data5 |data6 |below
}}
Usage notes
When Predloga:Tnf is used on an immediate subpage of its target template – e.g. on the target template's /doc page – its own |_template= 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 |_template= parameter explicitly.
The formatting of the parameter names can be changed with the |_display= parameter. By default, the parameter names are shown in triple braces (the parameter standard, e.g. {{{name}}} ), but if |_display=italics or |_display=italic is set, they are shown in italics.
A custom value for a parameter may be supplied by using |[parameter name]=[value] 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. |parameter=''value''<br/>). Custom values cannot be used for parameters whose names begin with an underscore ("_").
See also
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.









