Difference between revisions of "Template:Cite compare2/doc"
imported>Tom.Reding (+doc, adapted from Template:Cite compare) |
imported>Tom.Reding m (→Compare live and sandbox: 'footer') |
||
| Line 19: | Line 19: | ||
===Compare live and sandbox=== | ===Compare live and sandbox=== | ||
| − | <code><nowiki>{{cite compare2 |mode=web |sandbox=yes |url=http://www.example.com |website=Example Website |title=Example comparison |header=(header comment) |comment=(comment)}}</nowiki></code> produces: | + | <code><nowiki>{{cite compare2 |mode=web |sandbox=yes |url=http://www.example.com |website=Example Website |title=Example comparison |header=(header comment) |comment=(footer comment)}}</nowiki></code> produces: |
{{cite compare2 |mode=web |sandbox=yes |url=http://www.example.com |website=Example Website |title=Example comparison |header=(header comment) |comment=(footer comment)}} | {{cite compare2 |mode=web |sandbox=yes |url=http://www.example.com |website=Example Website |title=Example comparison |header=(header comment) |comment=(footer comment)}} | ||
Revision as of 20:07, 14 July 2016
| This is a documentation subpage for Template:Cite compare2. It contains usage information, categories and other content that is not part of the original template page. |
{{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:
| WT | {{cite web |title=Example comparison |url=http://www.example.com |website=Example Website}}
|
|---|---|
| Live | "Example comparison". Example Website. |
| Sandbox | Lua error in Module:Citation/CS1/sandbox at line 126: Argument map not defined for this variable. |
| (footer comment) | |
Compare live and sandbox
{{cite compare2 |mode=web |sandbox=yes |url=http://www.example.com |website=Example Website |title=Example comparison |header=(header comment) |comment=(footer comment)}} produces:
| WT | {{cite web |url=http://www.example.com |website=Example Website |title=Example comparison |sandbox=yes}}
|
|---|---|
| Live | "Example comparison". Example Website. Unknown parameter |sandbox= ignored (help)
|
| Sandbox | Lua error in Module:Citation/CS1/sandbox at line 188: Called with an undefined error condition. |
| (footer comment) | |