Module:If not given or empty/doc

This module's check_parameter function checks whether a parameter is given, empty, or nonempty in a template call. It is intended to be called from template definitions only, as This is similar to, but also checks if the parameter is *present* in the template call. This can be useful in the calls from a template to some existing templates, where the output depends on the three states of a parameter, as it does in Location map for.

The values before and after are added only for cases in which when contains the codes NG (for not given), EM (given but empty), NE (given and not empty).

Examples
Template Infobox some thing has parameter. When used on a page, the template can be called without the parameter, as in, or with the parameter, in which case the parameter can have no value  or some value. This module has different outputs depending on these three cases.


 * : final output is the equivalent of . Text   and   is not added because   does not contain NG (for not given).


 * : final output is . Text   and   is added because   contains EM (for empty).


 * : final output is the equivalent of  . Text   and   is not added because   does not contain NE (for not empty).