เมนูนำทาง
แม่แบบ:Show data Retrieval of data items{{data {{{1}}}|pst2|land area}}
, using parameter selection template Template:Pst2, gives the parameter land area, etc.
For retrieval of more data items it is more efficient to prepare a template for that, to be used as follows:
{{data {{{1}}}|
template name|..|..|..|..}}
so that this data template needs to be called only once.[2] The default template is Template:Show data, producing this page.
The four parameters are optional, they are passed on to the prepared template as parameters 2-5.
Special templates:
A parameter being undefined or empty typically means the same, see below. {{data ..|pst2|..}}
gives the empty string and the text "{{{..}}}
", respectively. Therefore an application checking the parameter has to check both. Checking whether a result is equal to e.g. the text "{{{popinc}}}
" 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 "{
", e.g.: {{#ifeq:{{padleft:|1|{{data {{{continent}}}|pst2|popinc}}}}|{|..|..}}
.
เมนูนำทาง
แม่แบบ:Show data Retrieval of data itemsใกล้เคียง
แม่แบบ:Show แม่แบบ:Show data แม่แบบ:Showbutton แม่แบบ:Show! Music Coreแหล่งที่มา
WikiPedia: แม่แบบ:Show data