Template:Error if empty/doc: Difference between revisions

From Wikipedia, the free encyclopedia

Content deleted Content added


 

 

Line 14: Line 14:

<includeonly>{{Sandbox other||

<includeonly>{{Sandbox other||

<!– Categories below this line –>

<!– Categories below this line –>

{{uncat}}

}}</includeonly>

}}</includeonly>


Latest revision as of 17:29, 24 November 2025

This template checks whether the first parameter is empty. If it is, it redirects all other parameters, shifted, to {{Error}}; otherwise it shows the first parameter, trimmed of trailing and leading spaces.

  • {{Error if empty|Hello world|Error: Lorem ipsum dolor sit amet.}}
    ↳ Hello world
  • {{Error if empty||Error: Lorem ipsum dolor sit amet.}}
    Error: Lorem ipsum dolor sit amet.
  • {{Error if empty|}}
    Error: There is no text to show.
  • {{Error if empty}}
    Error: There is no text to show.

Leave a Comment

Your email address will not be published. Required fields are marked *

Exit mobile version