Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a221ccb3dcb8b7b5

Jump to content

Template:Error if empty/doc

From Wikipedia, the free encyclopedia

The template {{Error if empty}} is used to avoid unwanted transclusions of the {{Error}} template in those cases in which the {{#if}} (or a similar) parser function is not directly used for determining the error conditions. In these cases, this templates will appear permanently transcluded instead of {{Error}}.

Usage

[edit]

This template checks whether the first parameter is empty. If it is, it calls {{Error}} using the second parameter; 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

See also

[edit]