try - Liquid Filter Reference - 0.11.4

Filter Name try
Group Collections
Version 0.11.4

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.4

 

 
Back to Documentation