ഫലകം:Ifnoteq then show

വിക്കിപീഡിയ, ഒരു സ്വതന്ത്ര വിജ്ഞാനകോശം.
[തിരുത്തുക] [പുതുക്കുക] ഫലകത്തിന്റെ വിവരണം

This template tests whether the first unnamed parameter is equal to the second unnamed parameter and returns the third unnamed parameter if it does. Otherwise it returns the first unnamed parameter.

This is useful when the first parameter is a {{#invoke: }} of a Lua module that returns a value for which a specific exception is required. Because it uses the {{#invoke: }} just once, it simplifies the coding of infoboxes, for example.

Usage[തിരുത്തുക]

An infobox field may return the രാജ്യം (P17) for an article about a city. We may wish to use the abbreviation "USA" in place of "United States".

രാജ്യം (P17) for (Q42462)
{{#invoke:WikidataIB |getValue |P17 |qid=Q42462 |fwd=ALL |osd=no |rank=best |noicon=true}}യുണൈറ്റഡ് കിങ്ഡം
{{Ifnoteq then show|{{#invoke:WikidataIB |getValue |P17 |qid=Q42462 |fwd=ALL |osd=no |rank=best |noicon=true}}|[[United States|United States]]|USA}}യുണൈറ്റഡ് കിങ്ഡം
രാജ്യം (P17) for ന്യൂയോർക്ക് നഗരം (Q60)
{{#invoke:WikidataIB |getValue |P17 |qid=Q60 |fwd=ALL |osd=no |rank=best |noicon=true}}അമേരിക്കൻ ഐക്യനാടുകൾ
{{Ifnoteq then show|{{#invoke:WikidataIB |getValue |P17 |qid=Q60 |fwd=ALL |osd=no |rank=best |noicon=true}}|[[United States|United States]]|USA}}അമേരിക്കൻ ഐക്യനാടുകൾ
"https://ml.wikipedia.org/w/index.php?title=ഫലകം:Ifnoteq_then_show&oldid=3321292" എന്ന താളിൽനിന്ന് ശേഖരിച്ചത്