try - Liquid Filter Reference - 0.11.3

Filter Name try
Group Collections
Version 0.11.3

Description

Tries to call the supplied attribute against the supplied object. Use this when you know the property may or may not exist on the object as a way to indicate that it’s expected and ok for it not to exist.

Examples

{{ error_1 | try: "code" }}

{{ error_2 | try: "code" }}
RED

Back to Filter List

Back to Liquid Reference for 0.11.3

 

 
Back to Documentation