Template:Ifequal/doc: Difference between revisions

From XMS Wiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 45: Line 45:
* The returned string is defined TRUE '''if any test pair of input parameters''' satisfies ''as if presented in any single <nowiki>#ifeq:</nowiki> test'''''.
* The returned string is defined TRUE '''if any test pair of input parameters''' satisfies ''as if presented in any single <nowiki>#ifeq:</nowiki> test'''''.


* The returned value is essentially TRUE OR FALSE&mdash; garbage characters OR a [[null (computer)]] [http://en.wikipedia.org/wiki/String_(computer_science) string], respectively.  Thus it is suitable for testing by a simple #if:-then-else conditional on the calling page.
* The returned value is essentially TRUE OR FALSE&mdash; garbage characters OR a [http://en.wikipedia.org/wiki/Null_(computer) null (computer)] [http://en.wikipedia.org/wiki/String_(computer_science) string], respectively.  Thus it is suitable for testing by a simple #if:-then-else conditional on the calling page.


:* Applications are generally to display selective text for a set of pages, as in for example, a common usage page for templates, selected by specific page name cases.
:* Applications are generally to display selective text for a set of pages, as in for example, a common usage page for templates, selected by specific page name cases.

Revision as of 19:31, 2 December 2013

This is a documentation subpage for Template:Ifequal (see that page for the template itself).
It contains usage information, categories and other content that is not part of the original template page.
Note page has hidden operative code when viewed directly.
This template is used to extend the parser function '#ifeq:' to multiple tests.
  • The returned string is defined TRUE if any test pair of input parameters satisfies as if presented in any single #ifeq: test.
  • The returned value is essentially TRUE OR FALSE— garbage characters OR a null (computer) string, respectively. Thus it is suitable for testing by a simple #if:-then-else conditional on the calling page.
  • Applications are generally to display selective text for a set of pages, as in for example, a common usage page for templates, selected by specific page name cases.
  • This template takes upto eight pairs of arguments (i.e 16 numbered parameters), tests the odd verus the even, and returns true if any pair matches using the parser function '#ifeq:'.


This can be used to test for criteria which may be satisfied by some combination of mulitple magic words, such as {{SITENAME}} or {{PAGENAME}}.