Koha Test Wiki MW Canasta on Koha Portainer

Test major Koha Wiki changes or bug fixes here without fear of breaking the production wiki.

For the current Koha Wiki, visit https://wiki.koha-community.org .

Template:If empty/testcases

From Koha Test Wiki MW Canasta on Koha Portainer
Jump to navigation Jump to search

one should be one; nine should be nine —CodeHydro 18:43, 23 December 2014 (UTC)

Code Sandbox Current
Template:Tlc Returns an empty string.
Template:Tlc one one Returns the first parameter that is defined and not empty.
Template:Tlc one one
Template:Tlc one one
Template:Tlc two two The first parameter is empty/undefined, so is passed over.
Template:Tlc two two
Template:Tlc two two
{{If empty/sandbox|||||||||nine}} nine nine
{{If empty/sandbox||||||||||ten}} ten ten Empty string returned if maximum of nine parameters exceeded.
Template:Tlc The only parameter is empty or undefined, so returns an empty string.
Template:Tlc Returns an empty string.
{{If empty/sandbox|{{{1|}}}|{{{2|}}}|three}} three three
{{If empty/sandbox|{{{1}}}|{{{2}}}|three}} {{{1}}} {{{1}}} No pipe-characters following the names of the first two parameters ("1" and "2"), so the first of these returned as text ("{{{1}}}").
{{If empty/sandbox|{{{logo|}}}|two}} two two
{{If empty/sandbox|{{{logo}}}|two}} {{{logo}}} {{{logo}}} No pipe-character following the parameter name "logo", so the text "{{{logo}}}" returned.
{{If empty/sandbox|2=x}} x x Whether parameter 1 is undefined or empty does not matter.
{{If empty/sandbox|p=q}} The template identifies the parameters it receives as parameters 1 to 9, not using names such as "p", etc.
{{If empty/sandbox|one|{{X1}}[[Category:X1]]}} one one Parameters after the first non-empty parameter are not expanded, so this page does not transclude Template:X1 and is not in Category:X1.