Filters

default

value | default

Falls back when the value is nil, false or empty — and, unlike stock Liquid, also when it is an empty string after trimming.

Where this differs

A setting left blank in the editor arrives as an empty string, not nil. Stock Liquid would render nothing; this renders the fallback, which is what the author meant.

Example

{{ section.settings.heading | default: 'Untitled' }}