default

Description

Return the value parameter if the input is either null or empty.

Syntax

{{ <object> | default: <value> }}

Example

{{ params.author | default: 'John Doe' }}

displays (if the value of params.author is null)

John Doe
© 2024 LocomotiveCMS Terms of use Privacy Policy
Back to top