टेम्पलेट:Show data: रिवीजन सभ के बीचा में अंतर

Content deleted Content added
No edit summary
लाइन 108:
*[[Template:Popareadens]] - for use on the page [[List of countries by population]]
 
A parameter being undefined or empty typically means the same, see below. <code><nowiki>{{data ..|get pst2|..}}</nowiki></code> gives the empty string and the text "<code><nowiki>{{{..}}}</nowiki></code>", respectively. Therefore an application checking the parameter has to check both. Checking whether a result is equal to e.g. the text "<code>{{{popinc}}}</code>" cannot be done directly with #ifeq in a template which itself has also a parameter with that name, because if that is defined, there would be a comparison with the value instead of the text itself. Instead, it can be checked whether the first character of the result is "<code>{</code>", e.g.: <code><nowiki>{{#ifeq:{{padleft:|1|{{data {{{continent}}}|get pst2|popinc}}}}|{|..|..}}</nowiki></code>.
 
==Creating new data templates==