Difference between revisions of "Template:Matches/doc"
Jump to navigation
Jump to search
imported>SimonTrew (→Parameters: image size) |
imported>SimonTrew (Use TemplateData) |
||
| Line 2: | Line 2: | ||
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> | <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> | ||
| − | Produces a {{tlx|tick}} if the two parameters match lexically, a {{tlx|cross}} otherwise. Quick and easy, for use in template testcases. The test is case-sensitive, it uses <code>#ifeq:</code>. | + | ==TemplateData== |
| − | + | {{TemplateData header}} | |
| − | + | <TemplateData> | |
| − | + | { | |
| − | + | "description": "Produces a {{tlx|tick}} if the two parameters match lexically, a {{tlx|cross}} otherwise. Quick and easy, for use in template testcases. The test is case-sensitive, it uses <code>#ifeq:</code>.", | |
| − | + | "params": { | |
| + | "1": { | ||
| + | "label": "first-value", | ||
| + | "description": "First of two strings to compare", | ||
| + | "type": "string", | ||
| + | "required": true | ||
| + | }, | ||
| + | "2": { | ||
| + | "label": "second-value", | ||
| + | "description": "Second of two strings to compare", | ||
| + | "type": "string", | ||
| + | "required": true | ||
| + | }, | ||
| + | "size": { | ||
| + | "label": "size", | ||
| + | "description": "Size of the tick or cross images", | ||
| + | "type": "number", | ||
| + | "required": false, | ||
| + | "default": "10" | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | </TemplateData> | ||
== Examples == | == Examples == | ||
Revision as of 10:32, 14 November 2015
| This is a documentation subpage for Template:Matches. It contains usage information, categories and other content that is not part of the original template page. |
TemplateData
This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.
TemplateData for Matches
Produces a {{tlx|tick}} if the two parameters match lexically, a {{tlx|cross}} otherwise. Quick and easy, for use in template testcases. The test is case-sensitive, it uses <code>#ifeq:</code>.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| first-value | 1 | First of two strings to compare | String | required |
| second-value | 2 | Second of two strings to compare | String | required |
| size | size | Size of the tick or cross images
| Number | optional |
Examples
{{matches|hello|hello}} →
{{matches|hello|goodbye}} →
- REDIRECT Template:Xmark
|
{{matches|hello|hello|size=55}} →
{{matches|hello|goodbye|size=55}} →
- REDIRECT Template:Xmark
|