Home  

Random  

Nearby  



Log in  



Settings  



Donate  



About Wikipedia  

Disclaimers  



Wikipedia





Template:Parameter names example





Template  

Talk  



Language  

Watch  

View source  





Redirects
  • {{Pnex}}
  • {{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

    An example wikitext to produce a demo for {{Infobox}} (on the right):

    {{{title}}}
    {{{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 {{Parameter names example}} 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=italicsor|_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


    Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Parameter_names_example&oldid=1179116205"
     



    Last edited on 8 October 2023, at 00:30  


    Languages

     


    Afrikaans
    ि
    Аԥсшәа
    العربية
    Արեւմտահայերէն

    Azərbaycanca
    تۆرکجه
    Basa Bali

     / Bân-lâm-gú
    Башҡортса
    Беларуская
    Беларуская (тарашкевіца)

    Bosanski
    Català
    ChiTumbuka
    Dansk
    الدارجة
    ދިވެހިބަސް
    Eesti
    Español
    فارسی
    Fiji Hindi
    Føroyskt
    Gaelg
    Galego

    Gungbe
    /Hak-kâ-ngî

    Hausa
    Hawaiʻi
    ि
    Hrvatski
    Ido
    Ilokano
    Bahasa Indonesia
    Íslenska
    Jawa

    Kurdî
    Ladin

    Latviešu
    Madhurâ
    ि
    Македонски
    Malagasy

    Māori

    مصرى

    Bahasa Melayu
     / Mìng-dĕ̤ng-nḡ
    Мокшень
    Монгол



    Norsk bokmål
    ି
    Oʻzbekcha / ўзбекча
    پښتو
    Português
    Română
    Русский

    Scots
    Shqip
    Simple English
    Slovenščina
    کوردی
    Српски / srpski
    ி


    Тоҷикӣ
    Türkçe
    Українська
    اردو
    Vèneto
    Tiếng Vit
    Winaray


     
     

    Wikipedia


    This page was last edited on 8 October 2023, at 00:30 (UTC).

    Content is available under CC BY-SA 4.0 unless otherwise noted.



    Privacy policy

    About Wikipedia

    Disclaimers

    Contact Wikipedia

    Code of Conduct

    Developers

    Statistics

    Cookie statement

    Terms of Use

    Desktop