Template:Reflist/doc

From vulcanforged WIKI
Jump to navigation Jump to search

{{#ifeq:doc |doc

    | 

{{#ifeq:show |show

         | Script error: No such module "Message box".
        }}{{#if: |
         |   {{#ifexist:Template:Reflist
                  | [[Category:{{#switch:Template |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]]
                  |
                 }}
        }}
    | 
   }}

Template:Ombox

This citation template provides formatting and organizational features for footnotes. It encapsulates the Template:Tag tag used by the cite.php MediaWiki extension to show the list of references as defined by Template:Tag tags. It adds support for a reduced font size, columns, groups.

If you don't use any of the additional features, then it produces the same output as the simpler and slightly faster Template:Tag tag.

Parameters

  • First unnamed parameter:
column-count: a natural number specifying fixed columns into which the reference list is to be rendered. Example: |2|.
column-width: a typographic unit of measurement such as em, specifying the width for the reference list columns. Example: |30em|.
  • refs: used with named references (e.g., Template:Tag); it specifies a list of some or all named references used in the article.
  • group: identifies by name the subset of references to be rendered; the value should correspond to that used inline, e.g., <templatestyles src="Template:Mono/styles.css"/>{{#if:{{safesubst:#switch:
|no
|n
|false
|0        = 
|         = 
|¬        = 
|yes
|y
|true
|1        = yes
|#default = yes

}}|<templatestyles src="Template:Nowrap/styles.css"/>}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:Reflist|Reflist]]{{#if:group=groupname||group=groupname}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}Template:)) renders all references with groupname as the group name (Template:Tag).

  • liststyle: specifies the style used when the reference list is enumerated; if none is specified, the default is to render a numbered list.

Example

Lorem.<ref>ipsum</ref><ref>dolor</ref><ref>sit</ref><ref>amet</ref>
Consectetur.<ref>adipisicing</ref><ref>elit, sed</ref><ref>do</ref>

{{Reflist|3}}

gives:

Lorem.<ref>ipsum</ref><ref>dolor</ref><ref>sit</ref><ref>amet</ref> Consectetur.<ref>adipisicing</ref><ref>elit, sed</ref><ref>do</ref>

1 }}
     | references-column-width 
     | references-column-count references-column-count-{{#if:1|3}} }}
   | {{#if: 
     | references-column-width }} }}" style="{{#if: 3
   | {{#iferror: {{#ifexpr: 3 > 1 }}
     | -moz-column-width: {{#if:1|3}}; -webkit-column-width: {{#if:1|3}}; column-width: {{#if:1|3}};
     | -moz-column-count: {{#if:1|3}}; -webkit-column-count: {{#if:1|3}}; column-count: {{#if:1|3}}; }}
   | {{#if: 
     | -moz-column-width: {{{colwidth}}}; -webkit-column-width: {{{colwidth}}}; column-width: {{{colwidth}}}; }} }} list-style-type: {{#switch: 
   | upper-alpha
   | upper-roman
   | lower-alpha
   | lower-greek
   | lower-roman = {{{group}}}
   | #default = decimal}};">
<references group=""></references>

TemplateData

{{#switch:<translate></translate> |=

{{#if:{{safesubst:#switch:
|no
|n
|false
|0        = 
|         = 
|¬        = 
|yes
|y
|true
|1        = yes
|#default = yes

}}|{{#ifexpr:{{#if:|{{#ifeq:Template:Reflist/doc|{{#switch:

|#default =  
| = 
   {{#ifeq:  | 
     | Template:{{{docpage}}}            
     |       
   }}

}}|0|1}}|not{{#ifexpr: ( {{#ifeq:doc|doc|1|0}} or ( {{#ifeq:{{#titleparts:template:reflist/doc|-1|-2}}|doc|1|0}} and {{#if:{{#translation:}}|1|0}} ) )|1|0}}}}|<templatestyles src="Module:Navbar/styles.css"/>{{#if:1||{{#if:|{{{text}}}|<translate> This box:</translate>}} }}{{#if:1|[}}[[{{#switch:

|#default = Reflist/doc 
| = 
   {{#ifeq:  | 
     | Template:Reflist/doc            
     | Reflist/doc      
   }}

}}|<span style="" title="<translate nowrap> View this template</translate>">{{#if:|<translate> v</translate>|<translate> view</translate>}}]] · [[[:Template:Fullurl:]] <span style="" title="<translate nowrap> Discuss this template</translate>">{{#if:|<translate> d</translate>|<translate> talk</translate>}}]{{#if:|| · [{{fullurl:{{#switch:

|#default = Reflist/doc 
| = 
   {{#ifeq:  | 
     | Template:Reflist/doc            
     | Reflist/doc      
   }}

}}|action=edit}} <span style="" title="<translate nowrap> Edit this template</translate>">{{#if:|<translate> e</translate>|<translate> edit</translate>}}]}}{{#if:1|]}}}}}} {{#if:||<translate> This is the [[<tvar name=1>Special:MyLanguage/Help:TemplateData</tvar>|TemplateData]] documentation for this template used by [[<tvar name=2>Special:MyLanguage/VisualEditor</tvar>|VisualEditor]] and other tools.</translate>}}

Reflist

{{#ifeq:doc|sandbox||{{#if:{{#ifexpr: (

{{#ifeq:doc|doc|1|0}} or ( {{#ifeq:{{#titleparts:template:reflist/doc|-1|-2}}|doc|1|0}} and {{#if:{{#translation:}}|1|0}} ) )|1|}}|[[Category:TemplateData documentation{{#translation:}}]]|[[Category:Templates using TemplateData{{#translation:}}]]}}}} | #default=

 Script error: No such module "Template translation".

}} <templatedata> { "description": "A reference list, with options for setting columns, groups, extra references etc.", "params": { "1": { "label": "Column Count", "type": "number", "default": "1" }, "colwidth": { "label": "Column Width", "type": "string" }, "liststyle": { "label": "List Style", "description": "Specifies the style used when the reference list is enumerated; accepts any valid CSS value defined for “list-style-type”.", "suggestedvalues": [ "decimal", "lower-alpha", "lower-greek", "lower-roman", "upper-alpha", "upper-roman" ], "default": "decimal", "type": "string" }, "group": { "label": "Group name", "description": "The name of the references group.", "type": "string" }, "refs": { "label": "List of references", "description": "Provides a space to define named references for use in the article.", "suggested": true, "type": "content" } } } </templatedata>

See also