Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Comics: Difference between revisions

Template page
Joe Beaudoin Jr. (talk | contribs)
+ categories
Joe Beaudoin Jr. (talk | contribs)
No edit summary
 
(30 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{#if:{{{nolink|}}}|
<includeonly>{{#if:{{{nolink|}}}|
{{#if:{{{2|}}}|{{void}}|{{comics/switch|{{{1}}}|{{{2}}}}}}}
{{#if:{{{2|}}}|{{void}}|{{comics/switch|{{{1}}}|{{{2}}}}}}}
{{#if:{{{template|}}}|{{comics/switch|{{{1}}}|{{{2}}}}}{{#ifeq:{{{1}}}|marvel|{{void}}|&nbsp;{{{2|}}}}}{{!}}''{{comics/switch|{{{1}}}|{{{2}}}}}{{#ifeq:{{{1}}}|marvel|{{void}}|&nbsp;#{{{2|}}}''}}|{{#if:{{{2|}}}|{{#if:{{{short|}}}|<nowiki>#</nowiki>{{{2|}}}|{{comics/switch|{{{1}}}|{{{2}}}}}{{#ifeq:{{{1}}}|marvel|{{void}}|&nbsp;{{{2|}}}}}}}}}}}|{{#if:{{{3|}}}|{{void}}|''}}[[{{comics/switch|{{{1}}}|{{{2}}}}}{{#if:{{{2|}}}|&nbsp;{{#if:{{{short|}}}|{{{2|}}}{{!}}#{{{2|}}}|{{#ifeq:{{{1}}}|marvel|{{void}}|{{{2|}}}}}{{!}}{{{3|{{comics/switch|{{{1}}}|{{{2}}}}}{{#ifeq:{{{1}}}|marvel|{{void}}|&nbsp;#{{{2|}}}}}}}}}}|{{#if:{{{3|}}}|{{!}}{{{3}}}|{{void}}}}}}]]{{#if:{{{3|}}}|{{void}}|''}}
{{#if:{{{template|}}}|{{comics/switch|{{{1}}}|{{{2}}}}}{{#ifeq:{{{1}}}|marvel|{{void}}|&nbsp;{{{2|}}}}}{{!}}''{{comics/switch|{{{1}}}|{{{2}}}}}{{#ifeq:{{{1}}}|marvel|{{void}}|&nbsp;#{{{2|}}}''}}|{{#if:{{{2|}}}|{{#if:{{{short|}}}|<nowiki>#</nowiki>{{{2|}}}|{{comics/switch|{{{1}}}|{{{2}}}}}{{#ifeq:{{{1}}}|marvel|{{void}}|&nbsp;{{{2|}}}}}}}}}}}|{{#ifeq:{{{sup|yes}}}|no||<sup>(}}{{#if:{{{prose|}}}||[[List of comics|Comics]]:&nbsp;}}{{#if:{{{comic1|}}}
}}{{#if:{{{nocat|}}}|{{void}}|[[Category:{{comics/switch|{{{1}}}}}]]}}</includeonly><noinclude>
|{{#ifeq:{{{comic1}}}|marvel
  |''[[{{comics/switch|{{{comic1}}}|{{{issue1}}}}}]]''
  |{{#if:{{{issue1|}}}|''[[{{comics/switch|{{{comic1}}}}}&nbsp;{{{issue1}}}|{{comics/switch|{{{comic1}}}}}&nbsp;#{{{issue1}}}]]''|''[[{{comics/switch|{{{comic1}}}}}]]''}}
  }}{{#if:{{{comic2|}}}
  |, {{#ifeq:{{{comic2}}}|marvel
    |''[[{{comics/switch|{{{comic2}}}|{{{issue2}}}}}]]''
    |{{#if:{{{issue2|}}}|''[[{{comics/switch|{{{comic2}}}}}&nbsp;{{{issue2}}}|{{comics/switch|{{{comic2}}}}}&nbsp;#{{{issue2}}}]]''|''[[{{comics/switch|{{{comic2}}}}}]]''}}
  }}
  }}{{#if:{{{comic3|}}}
  |, {{#ifeq:{{{comic3}}}|marvel
    |''[[{{comics/switch|{{{comic3}}}|{{{issue3}}}}}]]''
    |{{#if:{{{issue3|}}}|''[[{{comics/switch|{{{comic3}}}}}&nbsp;{{{issue3}}}|{{comics/switch|{{{comic3}}}}}&nbsp;#{{{issue3}}}]]''|''[[{{comics/switch|{{{comic3}}}}}]]''}}
  }}
  }}{{#if:{{{comic4|}}}
  |, {{#ifeq:{{{comic4}}}|marvel
    |''[[{{comics/switch|{{{comic4}}}|{{{issue4}}}}}]]''
    |{{#if:{{{issue4|}}}|''[[{{comics/switch|{{{comic4}}}}}&nbsp;{{{issue4}}}|{{comics/switch|{{{comic4}}}}}&nbsp;#{{{issue4}}}]]''|''[[{{comics/switch|{{{comic4}}}}}]]''}}
  }}
  }}{{#if:{{{comic5|}}}
  |, {{#ifeq:{{{comic5}}}|marvel
    |''[[{{comics/switch|{{{comic5}}}|{{{issue5}}}}}]]''
    |{{#if:{{{issue5|}}}|''[[{{comics/switch|{{{comic5}}}}}&nbsp;{{{issue5}}}|{{comics/switch|{{{comic5}}}}}&nbsp;#{{{issue5}}}]]''|''[[{{comics/switch|{{{comic5}}}}}]]''}}
  }}
  }}
|{{#if:{{{3|}}}
  |{{#ifeq:{{{1}}}|marvel
    |''[[{{comics/switch|{{{1}}}|{{{2}}}}}]] &mdash; [[{{comics/switch|{{{1}}}|{{{3}}}}}]]''
    |''[[{{comics/switch|{{{1}}}}}]]<nowiki> #</nowiki>[[{{comics/switch|{{{1}}}}}&nbsp;{{{2}}}|{{{2}}}]] &mdash; [[{{comics/switch|{{{1}}}}}&nbsp;{{{3}}}|{{{3}}}]]''
    }}
  |{{#if:{{{1|}}}
    |{{#if:{{{2|}}}
      |{{#ifeq:{{{1}}}|marvel
      |''[[{{comics/switch|{{{1}}}|{{{2}}}}}]]''
      |''[[{{comics/switch|{{{1}}}}}&nbsp;{{{2}}}|{{comics/switch|{{{1}}}}}&nbsp;<nowiki>#</nowiki>{{{2}}}]]''
      }}
      |''[[{{comics/switch|{{{1}}}}}]]''
    }}
    }}
  }}
}}{{#ifeq:{{{sup|yes}}}|no||)</sup>}}}}
{{#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}}}}}}}]]}}
}}}}</includeonly><noinclude>
= Documentation =
= Documentation =
This template creates a link to a comic for inline citations, for instance:
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.


* <nowiki>{{comics|1880|1}}</nowiki> creates {{comics|1880|1}}
== Single Issue Citation ==
* <nowiki>{{comics|bsgvsbsg|1}}</nowiki> creates {{comics|bsgvsbsg|1}}
This is the basic usage for citing a single comic book issue.
* <nowiki>{{comics|cw|1}}</nowiki> creates {{comics|cw|1}}
* <code><nowiki>{{comics|starbuck|1}}</nowiki></code> will produce: {{comics|starbuck|1}}
* <nowiki>{{comics|origins|1}}</nowiki> creates {{comics|origins|1}}
* <code><nowiki>{{comics|origins|5}}</nowiki></code> will produce: {{comics|origins|5}}
* <nowiki>{{comics|starbuck|1}}</nowiki> creates {{comics|starbuck|1}}
* <nowiki>{{comics|vol3|1}}</nowiki> creates {{comics|vol3|1}}


This template can also be used to shorten a link down to the issue number itself, when citing multiple comics within the same series, e.g.:  
You can also link to just the main series page by omitting the issue number:
* <code><nowiki>{{comics|vol3}}</nowiki></code> will produce: {{comics|vol3}}


* <nowiki>{{comics|starbuck|1|short=y}}</nowiki> creates {{comics|starbuck|1|short=y}}
== Issue Range Citation ==
To cite a range of issues from the same comic series, use three unnamed parameters in the format <code><nowiki>{{comics|series|start_issue|end_issue}}</nowiki></code>. This format links the series title and both the start and end issue numbers.
* <code><nowiki>{{comics|starbuck|1|4}}</nowiki></code> will produce: {{comics|starbuck|1|4}}


It can also print out the comic title ''without'' being linked, and also strips italics (they can be added on around the template call, of course):
== Multiple Comic Citation ==
To cite issues from different comic series in one reference, use numbered parameters like <code>comic1</code>, <code>issue1</code>, <code>comic2</code>, <code>issue2</code>, etc. This format now adds a category for each comic cited.
* <code><nowiki>{{comics|comic1=starbuck|issue1=1|comic2=origins|issue2=5}}</nowiki></code> will produce: {{comics|comic1=starbuck|issue1=1|comic2=origins|issue2=5}}


* <nowiki>{{comics|starbuck|1|nolink=y}}</nowiki> creates {{comics|starbuck|1|nolink=y}}
== Marvel Comics ==
* <nowiki>''{{comics|starbuck|1|nolink=y}}''</nowiki> creates ''{{comics|starbuck|1|nolink=y}}''
For Marvel comics, the parameter for the series must be '''marvel''' (all lowercase), and the issue number must be provided. The template will automatically format the link correctly.
* <nowiki>{{comics|starbuck|1|nolink=y|template=y}}</nowiki> creates {{comics|starbuck|1|nolink=y|template=y}}<ref>Piping is deliberate so as to be integrated into templates that already have linking abilities built in.</ref>
* <code><nowiki>{{comics|marvel|13}}</nowiki></code> will produce: {{comics|marvel|13}}
* <nowiki>{{comics|starbuck|1|short=y|nolink=y}}</nowiki> creates {{comics|starbuck|1|short=y|nolink=y}}<ref>Not that this is really necessary, anyway...</ref>
* <code><nowiki>{{comics|comic1=marvel|issue1=13|comic2=starbuck|issue2=1}}</nowiki></code> will produce: {{comics|comic1=marvel|issue1=13|comic2=starbuck|issue2=1}}


It can also be used to link to the proper comic issue, but with custom text to be hyperlinked.
=== 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.
* <nowiki>{{comics|vol3|1|In the Beginning}}</nowiki> creates {{comics|vol3|1|In the Beginning}}
**<code><nowiki>{{comics|vol3|nolink=y}}</nowiki></code> will produce: {{comics|vol3|nolink=y}}
 
* '''template=y''': Works in templates like infoboxes.  
The parameters switch for this template may be [[/switch|found here]].
** <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.
=== Marvel Comics ===
**<code><nowiki>{{comics|vol3|nocat=y}}</nowiki></code> will produce: {{comics|vol3|notcat=y}}
 
* '''sup=no''': Disables the default superscript formatting for the citation.
For Marvel comics, the usage will print out slightly differently, and titles must be called out by their ''issue'' number.
**<code><nowiki>{{comics|vol3|sup=no}}</nowiki></code> will produce: {{comics|vol3|sup=no}}
 
* '''prose=y''': Disables the "Comics" preamble link for in-line use. (Best to use in conjunction with "sup=no".)
e.g. ''[[Collision Course!]]'' (issue 13) would be called thusly:
**<code><nowiki>{{comics|vol3|sup=no|prose=y}}</nowiki></code> will produce: {{comics|vol3|sup=no|prose=y}}
 
</noinclude>
<code><nowiki>{{comics|marvel|13}}</nowiki></code>
 
And thus would print:
 
{{comics|marvel|13}}
 
It is ''important'' that the "marvel" call be entirely lowercase.
 
Parameters switch for the Marvel list may be [[/marvel|found here]].
 
== References ==
 
{{reflist}}
 
[[Category:Battlestar Wiki link templates|Comics]]</noinclude>

Latest revision as of 23:56, 7 September 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.

You can also link to just the main series page by omitting the issue number:

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.

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.

Marvel Comics

For Marvel comics, the parameter for the series must be marvel (all lowercase), and the issue number must be provided. The template will automatically format the link correctly.

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.
  • nocat=y: Prevents the template from adding a category to the page.
  • sup=no: Disables the default superscript formatting for the citation.
  • prose=y: Disables the "Comics" preamble link for in-line use. (Best to use in conjunction with "sup=no".)