ଛାଞ୍ଚ:If/doc
ଦେଖଣା
< ଛାଞ୍ଚ:If
This is a documentation subpage for ଛାଞ୍ଚ:If. It may contain usage information, categories and other content that is not part of the original ଛାଞ୍ଚ page. |
With this template the parser functions of the ParserFunctions collection with names starting with "#if" can be used in a way such that they do not strip spaces and newlines from the "then" and "else" part. Spaces still do not affect the outcome of the condition.
This template can be substituted.
Usage
[ସମ୍ପାଦନା]- {{if||x| p | q }} gives " p "
- {{if|expr|2<3| p | q }} gives " p "
- {{if|eq| u |u| p | q }} gives " p "
- {{if|exist| Help:Link | p | q }} gives " q "
- {{if|error|{{#expr:x}}| p | q }} gives " p "
Compare:
- {{#if:x| p | q }} gives "p"
- {{#ifexpr:2<3| p | q }} gives "p"
- {{#ifeq: u |u| p | q }} gives "p"
- {{#ifexist: Help:Link | p | q }} gives "q"
- {{#iferror:{{#expr:x}}| p | q }} gives "p"
See also
[ସମ୍ପାଦନା]- m:Template:If
- Template:Ifnotempty - for simplicity and to reduce the limitations due to the expansion depth limit, this is a separate template corresponding to #if only.