• ಮುಖ್ಯಪುಟ
  • ಹೀಗೇ ಒಂದು ಪುಟ
  • ಹತ್ತಿರದ
  • ಲಾಗ್ ಇನ್
  • ವ್ಯವಸ್ಥೆಗಳು
  • ದೇಣಿಗೆ
  • ಕನ್ನಡ ವಿಕಿಪೀಡಿಯ ಬಗ್ಗೆ
  • ಹಕ್ಕು ನಿರಾಕರಣೆಗಳು
ವಿಕಿಪೀಡಿಯ

ಟೆಂಪ್ಲೇಟು:Yesno

  • ಭಾಷೆ
  • ವೀಕ್ಷಿಸಿ
  • ಸಂಪಾದಿಸಿ
Template documentation[view] [edit] [history] [purge]
WarningThis template is used on ೧,೧೬,೦೦,೦೦೦+ pages, or roughly 8713% of all pages.
To avoid major disruption and server load, any changes should be tested in the template's /sandbox or /testcases subpages, or in your own user subpage. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them.

This template normalises an input to be a yes/no output.

Usageಸಂಪಾದಿಸಿ

The template discerns five possible logical outputs depending on the first parameter (input if you will).

In its simplest usage these will all be either "yes" or "" (blank — nothing no characters).

  1. {{yesno|yes}} results in "yes" (also applies to "Yes", "YeS", etc, "Y", "y" and "1")
  2. {{yesno|no}} results in "" (also applies to "No", "NO", "nO", "N", "n" and "0")
  3. {{yesno}} results in ""
  4. {{yesno|¬}} results in ""
  5. {{yesno|purplemonkeydishwasher}} result "yes" (also applies to any other value not given above).

Each of these output texts can be over-ridden individually. Note that for the named parameters, use of a blank value is not the same as omitting the parameter, i.e. including |def= (without specifying a value) will have a different effect than omitting |def= entirely.

  1. {{yesno|yes|yes=bacon}} results in "bacon" (also applies to "Yes", "YeS", etc, "Y", "y" and "1")
  2. {{yesno|no|no=ham}} results in "ham": (also applies to "No", "NO", "nO", "N", "n" and "0")
  3. {{yesno||blank=eggs}} results in "eggs"
    1. but {{yesno||no=ham}} results in "ham"
    2. and {{yesno||blank=eggs|no=ham}} results in "eggs"
  4. {{yesno|¬|¬=sausage}} results in "sausage"
  5. {{yesno|purplemonkeydishwasher|def=cup-of-tea}} results in "cup-of-tea" (also applies to any other value not given above).
    1. but {{yesno|purplemonkeydishwasher|yes=bacon}} results in "bacon"
    2. and {{yesno|purplemonkeydishwasher|def=cup-of-tea|yes=bacon}} results in "cup-of-tea"
    3. and {{yesno|purplemonkeydishwasher|def=}} results in ""

This may be used (apparently perversely) thus:

  • {{yesno|yes|yes=no|no=yes}} results in "no"
  • {{yesno|no|yes=no|no=yes}} results in "yes"

This creates a logical inversion.

Full parameter listಸಂಪಾದಿಸಿ

Unnamed parameter 1= the input value to be evaluated. The other parameters (all named, all optional), are the return values for their respective logical outcome. When set, each one overrules their default return value.

{{yesno
|
| yes  =
| no   =
| blank=
| ¬    =
| def  =
}}
Overview of {{yesno}} logical values and their associated texts
Input
parameter 1
(1=)
In code Logical return value Default
return text
Return text when set:
yes=Pos
no=Neg
blank=Blank
¬=Undefined
def=Def
Note
yes, y, 1* {{yesno|yes}} yes by definition "yes" "Pos" * Case-insensitive (Y=y)
Some Text {{yesno|Some Text}} yes by default "yes" "Def" "Pos" when def=<omitted>
no, n, 0* {{yesno|no}} no by definition "" "Neg" * Case-insensitive (N=n)
<blank> {{yesno|}} blank "" "Blank" "Neg" when blank=<omitted>
1=<blank> {{yesno|1=}} blank "" "Blank" "Neg" when blank=<omitted>
¬ {{yesno|¬}} ¬ "" "Undefined"
<omitted> {{yesno}} ¬ "" "Undefined"

TemplateDataಸಂಪಾದಿಸಿ

This is the TemplateData documentation for this template used by VisualEditor and other tools; click here to see a monthly parameter usage report for this template.

TemplateData for Yesno

This template normalises an input to be a yes/no output.

[Edit template data]

Template parameters

ಪರಿಮಿತಿವಿವರನಮೂನೆಸ್ಥಾನಮಾನ
Value1

The value to be evaluated

Stringrequired
Output on yesyes

Defines a value to output on yes

Stringಐಚ್ಛಿಕ
Output on nono

Defines a value to output on no

Stringಐಚ್ಛಿಕ
Output on blank inputblank

Defines a value to output if blank input

Stringಐಚ್ಛಿಕ
Output on ¬¬

Defines a value to output when input = ¬

Stringಐಚ್ಛಿಕ
Definite outputdef

Defines the output when value = yes

Stringಐಚ್ಛಿಕ
The above documentation is transcluded from ಟೆಂಪ್ಲೇಟು:Yesno/doc. (edit | history)
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this template.
"https://kn.wikipedia.org/w/index.php?title=ಟೆಂಪ್ಲೇಟು:Yesno&oldid=1009212" ಇಂದ ಪಡೆಯಲ್ಪಟ್ಟಿದೆ
Last edited on ೨೦ ಸೆಪ್ಟೆಂಬರ್ ೨೦೨೦, at ೧೦:೪೮
ವಿಕಿಪೀಡಿಯ
  • ಈ ಪುಟವನ್ನು ೨೦ ಸೆಪ್ಟೆಂಬರ್ ೨೦೨೦, ೧೦:೪೮ ರಂದು ಕೊನೆಯಾಗಿ ಸಂಪಾದಿಸಲಾಯಿತು.
  • ವಿಶೇಷವಾಗಿ ಟಿಪ್ಪಣಿ ಮಾಡದಿದ್ದ ಹೊರತು ಪಠ್ಯ "CC BY-SA 3.0" ರಡಿ ಲಭ್ಯವಿದೆ.
  • ಖಾಸಗಿ ಮಾಹಿತಿಯ ಬಗ್ಗೆ ನಿಲುವು
  • ಕನ್ನಡ ವಿಕಿಪೀಡಿಯ ಬಗ್ಗೆ
  • ಹಕ್ಕು ನಿರಾಕರಣೆಗಳು
  • ಬಳಕೆಯ ನಿಬಂಧನೆಗಳು
  • ಡೆಸ್ಕ್‌ಟಾಪ್
  • ಡೆವೆಲಪರ್‌ಗಳು
  • ಅಂಕಿ ಅಂಶಗಳು
  • Cookie statement