模板:Testcases side by side/doc
此页面是Template:Testcases side by side的模板文档。 此页面可能包含了模板的使用说明、分类和其他内容。 |
This template is designed to provide side-by-side comparisons of template and sandbox code on the /testcases
sub-page for a given template.
用途
编辑{{ Testcases side by side | {{Template 1 |parameter1 |parameter2 |etc}} | {{Template 1/sandbox |parameter1 |parameter2 |etc}} }}
参数
编辑The template accepts three unnamed parameters, the first two of which should be the full code of the templates to be compared. The third allows for the comparison table to be centrally aligned: simply pass "center" as the third attribute, using: |center
Named parameters are:
- t1: title for template 1, formatted as a template using
{{tl}}
; defaults to{{BASEPAGE}}
- t2: title for template 2, formatted as a template using
{{tl}}
; defaults to{{BASEPAGE/sandbox}}
} - t3: title for template 1, completely overrides t1; set
|t3=
with no value for no title - t4: title for template 2, completely overrides t2; set
|t4=
with no value for no title - box=y: sets table width to 90% and adds dashes to the template cells
- title: sets table title, defaults to Side by side comparison; set
|title=
with no value for no title
参见
编辑- {{Testcase table}} similar template uses Module:Testcase table, a script written in Lua
- {{Testcases side by side by side}}:适用三个以上的比较
- {{Markup}} to present markup or code side by side with the rendered output