Difference between revisions of "Template:Cite compare2"

From blackwiki
Jump to navigation Jump to search
imported>ShakespeareFan00
(Undid revision 852712413 by ShakespeareFan00 (talk))
imported>Izno
Line 1: Line 1:
 +
{{Template for discussion/dated|action=|page=Cite compare2|link=Wikipedia:Templates for discussion/Log/2019 September 5#Template:Cite compare2|help=off|bigbox={{#invoke:Noinclude|noinclude|text=yes}}}}
 
{| class = wikitable width=100%
 
{| class = wikitable width=100%
 
|+{{#ifeq:{{lc:{{{mode}}}}}|citation|Citation |Cite {{{mode}}}}} compare{{#if:{{{header|}}}| {{{header}}}}}
 
|+{{#ifeq:{{lc:{{{mode}}}}}|citation|Citation |Cite {{{mode}}}}} compare{{#if:{{{header|}}}| {{{header}}}}}

Revision as of 13:52, 5 September 2019

Template:Template for discussion/dated

Cite {{{mode}}} compare
{{cite {{{mode}}} |}}
Live
50px Template documentation[view] [edit] [history] [purge]

{{cite compare2}} is a documentation tool similar to {{cite compare}}, but only used to display the live Module:Citation/CS1 Lua engine output, and optionally the Module:Citation/CS1/sandbox output. {{cite compare}} forces the display of either the old or the sandbox versions.

{{cite compare2}} also has the optional |header= parameter, which adds text after the Cite <mode> compare heading, for a more compact display.

Usage

{{cite compare2}} is controlled by four parameters:

  • |mode= – selects which of the CS1 templates will be compared; for {{cite web}}, |mode=web; for {{cite journal}}, |mode=journal; etc.
  • |sandbox= – when set to yes (or any text), includes the citation as rendered by Module:Citation/CS1/sandbox
  • |comment= – when set to a comment, displays the comment at the bottom of the comparison table
  • |header= – analogous to |comment=, but displays in bold after the Cite <mode> compare heading text

Default display

The default display is simply the wiki markup text and the current live CS1 template.

{{cite compare2 |mode=web |url=http://www.example.com |website=Example Website |title=Example comparison |header=(header comment) |comment=(footer comment)}} produces: Template:Template for discussion/dated

Cite web compare (header comment)
{{cite web |title=Example comparison |url=http://www.example.com |website=Example Website}}
Live "Example comparison". Example Website.

(footer comment)

Compare live and sandbox

{{cite compare2 |mode=web |url=http://www.example.com |website=Example Website |title=Example comparison |header=(header comment) |comment=(footer comment)}} produces: Template:Template for discussion/dated

Cite web compare (header comment)
{{cite web |title=Example comparison |url=http://www.example.com |website=Example Website}}
Live "Example comparison". Example Website.

(footer comment)