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: a2358e27acde227c

Jump to content

Template:If either/doc

From Wikipedia, the free encyclopedia
{{if either (|a) (|b) (|first result) (|second result)}}
 "If either (a or) (b) is true, (return first result,) (else return second result)."

This helper template is designed to be used in other templates. It can help editors create template code that is more self documenting. There are no advantages of using this template over using the construct {{#if:{{{1|}}}{{{2|}}} |…}}: all parameters are fully evaluated before reaching the template.

The "or" in the "a or b" above is inclusive: if both a and b are true, the template will return the first result.

This template can also be used to replace the construct {{#if:a |true |{{#if:b |true |false}}}} (i.e. "if a, then true; else if b, then true; else false").

Examples

CodeResult
{{if either |a |b |true |false}}true
{{if either |a | |true |false}}true
{{if either | |b |true |false}}true
{{if either | | |true |false}}false

See also