Template:Comics: Difference between revisions
Template page
More actions
mNo edit summary |
No edit summary |
||
| Line 7: | Line 7: | ||
|{{#if:{{{1|}}}|{{#if:{{{2|}}}|''[[{{comics/switch|{{{1}}}}} {{{2}}}|{{comics/switch|{{{1}}}}} #{{{2}}}]]''|''[[{{comics/switch|{{{1}}}}}]]''}}}} | |{{#if:{{{1|}}}|{{#if:{{{2|}}}|''[[{{comics/switch|{{{1}}}}} {{{2}}}|{{comics/switch|{{{1}}}}} #{{{2}}}]]''|''[[{{comics/switch|{{{1}}}}}]]''}}}} | ||
}} | }} | ||
}}){{#ifeq:{{{sup|yes}}}|no||</sup>}} | }}){{#ifeq:{{{sup|yes}}}|no||</sup>}}}} | ||
{{#if:{{{nocat|}}}||{{#if:{{{comic1|}}} | {{#if:{{{nocat|}}}||{{#if:{{{comic1|}}} | ||
|[[Category:{{#ifeq:{{{comic1}}}|marvel|{{comics/switch|{{{comic1}}}|{{{issue1}}}}}|{{comics/switch|{{{comic1}}}}}}}]] | |||
{{#if:{{{comic2|}}}|[[Category:{{#ifeq:{{{comic2}}}|marvel|{{comics/switch|{{{comic2}}}|{{{issue2}}}}}|{{comics/switch|{{{comic2}}}}}}}]]}} | |||
{{#if:{{{comic3|}}}|[[Category:{{#ifeq:{{{comic3}}}|marvel|{{comics/switch|{{{comic3}}}|{{{issue3}}}}}|{{comics/switch|{{{comic3}}}}}}}]]}} | |||
{{#if:{{{comic4|}}}|[[Category:{{#ifeq:{{{comic4}}}|marvel|{{comics/switch|{{{comic4}}}|{{{issue4}}}}}|{{comics/switch|{{{comic4}}}}}}}]]}} | |||
{{#if:{{{comic5|}}}|[[Category:{{#ifeq:{{{comic5}}}|marvel|{{comics/switch|{{{comic5}}}|{{{issue5}}}}}|{{comics/switch|{{{comic5}}}}}}}]]}} | |||
|{{#if:{{{1|}}}|[[Category:{{#ifeq:{{{1}}}|marvel|{{comics/switch|{{{1}}}|{{{2}}}}}|{{comics/switch|{{{1}}}}}}}]]}} | |{{#if:{{{1|}}}|[[Category:{{#ifeq:{{{1}}}|marvel|{{comics/switch|{{{1}}}|{{{2}}}}}|{{comics/switch|{{{1}}}}}}}]]}} | ||
}}}}</includeonly><noinclude> | }}}}</includeonly><noinclude> | ||
| Line 34: | Line 38: | ||
* '''nolink=y''': Prints the comic title without linking. Note: This currently only works for single issue citations using the first and second unnamed parameters. | * '''nolink=y''': Prints the comic title without linking. Note: This currently only works for single issue citations using the first and second unnamed parameters. | ||
**<code><nowiki>{{comics|vol3|nolink=y}}</nowiki></code> will produce: {{comics|vol3|nolink=y}} | **<code><nowiki>{{comics|vol3|nolink=y}}</nowiki></code> will produce: {{comics|vol3|nolink=y}} | ||
* '''template=y''': Works in templates like infoboxes. | * '''template=y''': Works in templates like infoboxes. | ||
** <code><nowiki>{{comics|vol3|template=y|nolink=y}}</nowiki></code> will produce: {{comics|vol3|template=y}} | ** <code><nowiki>{{comics|vol3|template=y|nolink=y}}</nowiki></code> will produce: {{comics|vol3|template=y}} | ||
* '''nocat=y''': Prevents the template from adding a category to the page. | * '''nocat=y''': Prevents the template from adding a category to the page. | ||
Revision as of 01:22, 24 August 2025
Documentation
This template creates a link to a comic for inline citations. It supports citing a single issue, a range of issues, or multiple different comics at once.
Single Issue Citation
This is the basic usage for citing a single comic book issue.
{{comics|starbuck|1}}will produce: (Comics: Battlestar Galactica: Starbuck #1){{comics|origins|5}}will produce: (Comics: Battlestar Galactica: Origins #5)
You can also link to just the main series page by omitting the issue number:
{{comics|vol3}}will produce: (Comics: Classic Battlestar Galactica Vol. 3)
Issue Range Citation
To cite a range of issues from the same comic series, use three unnamed parameters in the format {{comics|series|start_issue|end_issue}}. This format links the series title and both the start and end issue numbers.
{{comics|starbuck|1|4}}will produce: (Comics: Battlestar Galactica: Starbuck #1 — 4)
Multiple Comic Citation
To cite issues from different comic series in one reference, use numbered parameters like comic1, issue1, comic2, issue2, etc. This format now adds a category for each comic cited.
{{comics|comic1=starbuck|issue1=1|comic2=origins|issue2=5}}will produce: (Comics: Battlestar Galactica: Starbuck #1, Battlestar Galactica: Origins #5)
Other Parameters
- nolink=y: Prints the comic title without linking. Note: This currently only works for single issue citations using the first and second unnamed parameters.
{{comics|vol3|nolink=y}}will produce: Classic Battlestar Galactica Vol. 3
- template=y: Works in templates like infoboxes.
{{comics|vol3|template=y|nolink=y}}will produce: (Comics: Classic Battlestar Galactica Vol. 3)
- nocat=y: Prevents the template from adding a category to the page.
{{comics|vol3|nocat=y}}will produce: (Comics: Classic Battlestar Galactica Vol. 3)
- sup=no: Disables the default superscript formatting for the citation.
{{comics|vol3|sup=no}}will produce: (Comics: Classic Battlestar Galactica Vol. 3)