Template:Str if empty

From Wikimedia Commons, the free media repository
Jump to: navigation, search


Documentation icon Documentationviewedithistorypurge

This documentation is transcluded from Template:Str if empty/doc.

Checks if the string 1 is empty (after the usual template trimming). If it is returns string 2 (trimmed) else returns 1 (trimmed) (or parameter 3 if supplied).


{{Str if empty |1= |2= |3= }}

Template parameters

Parameter Description Default Status
1 String to be checked parameter 2 optional
2 String to be returned if empty "empty" (without quotes) optional
3 String to be returned if not empty parameter 1 optional

Additional information

The template is intended to be used in the following namespaces: the Template namespace

The template is intended to be used by the following user groups: all users


This template is not intended to be localized.