Difference between revisions of "Template:Cite compare2"
imported>ShakespeareFan00 |
imported>ShakespeareFan00 (Undid revision 852712413 by ShakespeareFan00 (talk)) |
||
| Line 7: | Line 7: | ||
{{!}}- | {{!}}- | ||
{{!}}width{{=}}4em style{{=}}"background:#DDDDDD;" {{!}} Sandbox {{!}}{{!}} style{{=}}"padding-left:0.5em;" {{!}} <includeonly>{{#invoke:template wrapper|wrap|_template=cite {{{mode|}}}/new|_exclude=mode,comment,sandbox,header }}</includeonly> }}<!-- | {{!}}width{{=}}4em style{{=}}"background:#DDDDDD;" {{!}} Sandbox {{!}}{{!}} style{{=}}"padding-left:0.5em;" {{!}} <includeonly>{{#invoke:template wrapper|wrap|_template=cite {{{mode|}}}/new|_exclude=mode,comment,sandbox,header }}</includeonly> }}<!-- | ||
| − | -->{{#if:{{{comment|}}}|< | + | -->{{#if:{{{comment|}}}|<nowiki/> |
| − | |||
{{!}}- | {{!}}- | ||
| − | {{!}} style="background:#FFFFFF; padding-left:1em;" colspan = 2 {{!}} {{{comment}}} | + | {{!}} style="background:#FFFFFF; padding-left:1em;" colspan = 2 {{!}} {{{comment}}}}} |
|}<noinclude> | |}<noinclude> | ||
{{documentation}} | {{documentation}} | ||
</noinclude> | </noinclude> | ||
Revision as of 21:33, 30 July 2018
{{cite {{{mode}}} |}}
| |
| Live | |
{{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 toyes(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:
{{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:
{{cite web |title=Example comparison |url=http://www.example.com |website=Example Website}}
| |
| Live | "Example comparison". Example Website.
|
| (footer comment) | |
| The above documentation is transcluded from Template:Cite compare2/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |