Difference between revisions of "Template:Both/doc"

From blackwiki
Jump to navigation Jump to search
imported>Danmichaelo
imported>JJMC89
({{sandbox other}})
 
(15 intermediate revisions by 11 users not shown)
Line 1: Line 1:
{{documentation subpage}}
+
{{Documentation subpage}}
 +
{{high-risk|975000+}}
  
==Usage==
+
===Usage===
<nowiki>{{both|string1|string2}}</nowiki>
+
{{tlc|{{BASEPAGENAME}}|string1|string2}}
  
 
Produces '''1''' (equivalent to a true condition) if both ''string1'' and ''string2'' are non-empty; otherwise produces the empty string (false condition).
 
Produces '''1''' (equivalent to a true condition) if both ''string1'' and ''string2'' are non-empty; otherwise produces the empty string (false condition).
  
<includeonly>
+
===TemplateData===
 +
{{TemplateDataHeader}}
 +
<templatedata>{
 +
"description": "Produces '1' (equivalent to a true condition) if both 'string1' and 'string2' are non-empty; otherwise produces the empty string (false condition).",
 +
"params": {
 +
  "1": {
 +
    "label": "String1",
 +
    "description": "First string",
 +
    "type": "string",
 +
    "required": true
 +
  },
 +
  "2": {
 +
    "label": "String2",
 +
    "description": "Second string",
 +
    "type": "string",
 +
    "required": true
 +
  }
 +
}}</templatedata>
 +
 
 +
== See also ==
 +
*{{tl|if}}
 +
 
 +
<includeonly>{{sandbox other||
 
[[Category:Boolean, register, and condition testing templates]]
 
[[Category:Boolean, register, and condition testing templates]]
[[Category:Wikipedia formatting and function templates]]
+
[[Category:If-then-else templates]]
 
+
}}</includeonly>
[[cy:Nodyn:Y ddau]]
 
[[da:Skabelon:Booland]]
 
[[de:Vorlage:Booland]]
 
[[eo:Ŝablono:Booland]]
 
[[es:Plantilla:Both]]
 
[[ja:Template:Both]]
 
[[no:Mal:Both]]
 
[[sl:Predloga:Both]]
 
</includeonly>
 

Latest revision as of 04:22, 4 December 2016

Usage

{{Both|string1|string2}}

Produces 1 (equivalent to a true condition) if both string1 and string2 are non-empty; otherwise produces the empty string (false condition).

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 Both

Produces '1' (equivalent to a true condition) if both 'string1' and 'string2' are non-empty; otherwise produces the empty string (false condition).

Template parameters

ParameterDescriptionTypeStatus
String11

First string

Stringrequired
String22

Second string

Stringrequired

See also