Difference between revisions of "Template:Comics"

From Battlestar Wiki, the free, open content Battlestar Galactica encyclopedia and episode guide
(marvel fix attempt 2)
(switch)
Line 2: Line 2:
 
{{#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|}}}}}}}}}}}|{{#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:{{{nocat|}}}|{{void}}|[[Category:{{#ifeq:{{{1}}}|marvel|{{comics/switch|{{{1}}}}}|{{comics/switch|{{{1}}}|{{{2}}}}}}}]]}}</includeonly><noinclude>
+
}}{{#if:{{{nocat|}}}|{{void}}|[[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, for instance:

Revision as of 17:26, 13 October 2021

Documentation

This template creates a link to a comic for inline citations, for instance:

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.:

  • {{comics|starbuck|1|short=y}} creates #1[[Category:|Battlestar Galactica: Starbuck]]

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):

  • {{comics|starbuck|1|nolink=y}} creates Battlestar Galactica: Starbuck 1[[Category:|Battlestar Galactica: Starbuck]]
  • ''{{comics|starbuck|1|nolink=y}}'' creates Battlestar Galactica: Starbuck 1[[Category:|Battlestar Galactica: Starbuck]]
  • {{comics|starbuck|1|nolink=y|template=y}} creates Battlestar Galactica: Starbuck 1|Battlestar Galactica: Starbuck #1[[Category:|Battlestar Galactica: Starbuck]][1]
  • {{comics|starbuck|1|short=y|nolink=y}} creates #1[[Category:|Battlestar Galactica: Starbuck]][2]

It can also be used to link to the proper comic issue, but with custom text to be hyperlinked.

  • {{comics|vol3|1|In the Beginning}} creates In the Beginning[[Category:|Classic Battlestar Galactica Vol. 3]]

The parameters switch for this template may be found here.

Marvel Comics

For Marvel comics, the usage will print out slightly differently, and titles must be called out by their issue number.

e.g. Collision Course! (issue 13) would be called thusly:

{{comics|marvel|13}}

And thus would print:

Collision Course![[Category:Collision Course!|]]

It is important that the "marvel" call be entirely lowercase.

Parameters switch for the Marvel list may be found here.

References

  1. Piping is deliberate so as to be integrated into templates that already have linking abilities built in.
  2. Not that this is really necessary, anyway...