Template:Reflist: Difference between revisions

From the Kingdom Hearts Wiki, the Kingdom Hearts encyclopedia
Jump to navigationJump to search
No edit summary
m (Protected "Template:Reflist": High traffic page ([Edit=Allow only KHWiki staff] (indefinite) [Move=Allow only KHWiki staff] (indefinite)))
 
(5 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<div class="references-small <!--
<includeonly><div class="reflist" style="{{#if:{{{1|}}}|column-count:{{{1}}}|{{#if:{{{colwidth|}}}|column-width:{{{colwidth}}}}}}}">
-->{{#if: {{{1|}}}
{{#tag:references||group={{{group|}}}|responsive={{#if:{{{1|{{{colwidth|}}}}}}|0}}}}</div></includeonly><noinclude>
    | {{#iferror: {{#ifexpr: {{{1|1}}} > 1 }}
== Usage ==
      | references-column-width
Use this template to add a list of references and citations to an article's "References" section.
      | references-column-count references-column-count-{{#if:1|{{{1}}}}} }}
    | {{#if: {{{colwidth|}}}
      | references-column-width }} }}" style="<!--
-->{{#if: {{{1|}}}
    | {{#iferror: {{#ifexpr: {{{1|1}}} > 1 }}
      | column-width: {{{1|30em}}};
      | column-count: {{{1|2}}}; }}
    | {{#if: {{{colwidth|}}}
      | column-width: {{{1|30em}}}; }} }} list-style-type: <!--
-->{{{liststyle|{{#switch: {{{group|}}}
    | upper-alpha
    | upper-roman
    | lower-alpha
    | lower-greek
    | lower-roman = {{{group}}}
    | #default = decimal}}}}};">
{{#tag:references|{{{refs|}}}|group={{{group|}}}}}</div><!--


=== Automatic mode ===
Using <code><nowiki>{{reflist}}</nowiki></code> will create a single-column list if there are 10 references or fewer, and a responsive multi-column list if there are more than 10 items. The number of columns will vary depending on the browser's width.


<div class="references-small {{#if: {{{colwidth|}}} | references-column-width | {{#iferror: {{#ifexpr: {{{1|1}}}>1 | references-column-count references-column-count-{{{1}}} }} }} }}" {{#if: {{{colwidth|}}}| style="-moz-column-width:{{{colwidth}}}; column-width:{{{colwidth}}};" | {{#if: {{{1|}}}| style="-moz-column-count:{{{1}}}; column-count:{{{1}}};" }} }}>
=== Specific parameters ===
{{#tag:references||group={{{group|}}}}}</div>
Using <code><nowiki>{{reflist|2}}</nowiki></code> will create a two-column reference list, and <code><nowiki>{{reflist|3}}</nowiki></code> will create a three-column list.


Using <code><nowiki>{{reflist|colwidth=30em}}</nowiki></code> will allow the browser to automatically choose the number of columns based on the width of the web browser. Choose a column width that's appropriate for the average width of the references on the page.


--><noinclude>
[[Category:Utility templates]]</noinclude>
==Usage==
This is the template used to list down references and citations at the References section.
 
To use:
<pre>
{{reflist}}
</pre>
 
To add columns to the list:
<pre>
{{reflist|2}} or {{reflist|3}}
</pre>
 
[[Category:Utility templates|{{PAGENAME}}]]
</noinclude>

Latest revision as of 00:38, 31 May 2023

Usage

Use this template to add a list of references and citations to an article's "References" section.

Automatic mode

Using {{reflist}} will create a single-column list if there are 10 references or fewer, and a responsive multi-column list if there are more than 10 items. The number of columns will vary depending on the browser's width.

Specific parameters

Using {{reflist|2}} will create a two-column reference list, and {{reflist|3}} will create a three-column list.

Using {{reflist|colwidth=30em}} will allow the browser to automatically choose the number of columns based on the width of the web browser. Choose a column width that's appropriate for the average width of the references on the page.