try - Liquid Filter Reference - 0.10.11
Filter Name | try |
Group | Collections |
Version | 0.10.11 |
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 Liquid Reference for 0.10.11
Back to Documentation