Template:Ref: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
No edit summary
(Use template demo template)
 
(21 intermediate revisions by one other user not shown)
Line 1: Line 1:
<includeonly>{{#tag:ref| {{{1|}}} | group = {{{2|}}} | name = {{{3|}}}}}</includeonly><noinclude>Add a reference with a group. For use with [[Template:Reflist]].
<includeonly>{{#if:{{{name|}}}|{{#tag:ref|{{{1|}}}|group={{{2|}}}|name={{{name|}}}}}|{{#tag:ref|{{{1|}}}|group={{{2|}}}}}}}</includeonly><noinclude>{{Documentation|content=
Add a reference with a group. For use with [[Template:Reflist]].
 
The groups act1, act2, act3, url and note will also be automatically formatted.
 
== Examples ==
== Examples ==
When used with Reflist:
When used with Reflist:
<pre>{{cite|reference example}}</pre>
{{Template demo
Example text without a group. {{cite|reference example}}
| style = list
 
| <nowiki>Example this.{{ref|example}}
<pre>{{cite|reference example|act1}}</pre>
Example that.{{ref|act 2 reference|act2}}
Example text with a group. {{cite|reference example|act1}}
Example those.{{ref|act 1 reference|act1}}
Named example.{{ref|name=named|named reference|act1}}{{ref|name=namedtwo|second named reference}}
Named again.{{ref|name=named||act1}}{{ref|name=namedtwo}}


{{reflist}}
{{reflist}}
{{reflist|act1}}
{{reflist|act1}}
{{reflist|act2}}</nowiki>
}}


== Template data ==
== Template data ==
Line 18: Line 26:
"label": "Reference",
"label": "Reference",
"description": "The reference or source itself.",
"description": "The reference or source itself.",
"required": true
"suggested": true
},
},
"2": {
"2": {
"label": "Group",
"label": "Group",
"description": "A group for use with Reflist. Valid values are act1, act2, act3, text, and url. Leave empty it no group is fitting.",
"description": "A group for use with Reflist."
"suggested": true
},
},
"3": {
"name": {
"label": "Name",
"label": "Name",
"description": "An optional name for the reference."
"description": "An optional name for the reference."
Line 32: Line 39:
}
}
</templatedata>
</templatedata>
}}
[[Category:Templates]]
[[Category:Citation templates]]
</noinclude>
</noinclude>

Latest revision as of 21:33, 19 January 2025

Template documentation

Add a reference with a group. For use with Template:Reflist.

The groups act1, act2, act3, url and note will also be automatically formatted.

Examples

When used with Reflist:

Markup
Example this.{{ref|example}}
Example that.{{ref|act 2 reference|act2}}
Example those.{{ref|act 1 reference|act1}}
Named example.{{ref|name=named|named reference|act1}}{{ref|name=namedtwo|second named reference}}
Named again.{{ref|name=named||act1}}{{ref|name=namedtwo}}

{{reflist}}
{{reflist|act1}}
{{reflist|act2}}
Renders as
Example this.[1]

Example that.[act2 a] Example those.[act1 a] Named example.[act1 b][2] Named again.[act1 b][2]

  1. example
  2. 2.0 2.1 second named reference
  1. act 1 reference
  2. 2.0 2.1 named reference
  1. act 2 reference

Template data

No description.

Template parameters

ParameterDescriptionTypeStatus
Reference1

The reference or source itself.

Unknownsuggested
Group2

A group for use with Reflist.

Unknownoptional
Namename

An optional name for the reference.

Unknownoptional