Difference between revisions of "Template:ComicLink"

From BIONICLEsector01
(Update to reflect the fact that this template only handles comics)
(Use ComicTitle Lua module)
 
Line 1: Line 1:
<includeonly>{{ComicTitle|{{{1}}}|type=_link|_color={{{color|}}}}}</includeonly><noinclude>
+
<includeonly>{{#invoke:ComicTitle|comicLink|{{{1}}}|color={{{color|}}}}}</includeonly><noinclude>
  
 
==Documentation==
 
==Documentation==
Line 10: Line 10:
 
|-
 
|-
 
|(first parameter)
 
|(first parameter)
|Text representing the piece of media being cited. It can either be the full article name of the piece of media (such as <code>BIONICLE 1: The Coming of the Toa</code>) or a shortcut indicated on that article with Template:Shortcut (such as <code>C1</code>).
+
|Text representing the piece of media being cited. It should be the shortcut indicated on that article with Template:Shortcut (such as <code>[[BIONICLE Legends 1: Island of Doom|BL1]]</code>).
 
|-
 
|-
 
|<code>color</code> '''(optional)'''
 
|<code>color</code> '''(optional)'''
Line 20: Line 20:
 
===Examples===
 
===Examples===
 
* Passing in an article shortcut: <code><nowiki>{{ComicLink|C1}}</nowiki></code> produces: {{ComicLink|C1}}
 
* Passing in an article shortcut: <code><nowiki>{{ComicLink|C1}}</nowiki></code> produces: {{ComicLink|C1}}
* Passing in an article's full name: <code><nowiki>{{ComicLink|BIONICLE Glatorian 2: The Fall of Atero}}</nowiki></code> produces: {{ComicLink|BIONICLE Glatorian 2: The Fall of Atero}}
+
* Passing in an article's full name: <code><nowiki>{{ComicLink|GC2}}</nowiki></code> produces: {{ComicLink|GC2}}
* Link with custom color: <code><nowiki>{{ComicLink|BIONICLE 2: Deep into Darkness|color=#00ff00}}</nowiki></code> produces: {{ComicLink|BIONICLE 2: Deep into Darkness|color=#00ff00}}
+
* Link with custom color: <code><nowiki>{{ComicLink|C2|color=#00ff00}}</nowiki></code> produces: {{ComicLink|C2|color=#00ff00}}

Latest revision as of 08:39, 28 June 2022


Documentation

This template produces nicely formatted links to articles about BIONICLE comic books by rendering the link text in italics or quotation marks as convention dictates.

Parameters

Parameter Function
(first parameter) Text representing the piece of media being cited. It should be the shortcut indicated on that article with Template:Shortcut (such as BL1).
color (optional) The link color.

Default: nothing (link has default color)

Examples