Answers for "twig default"

0

twig default

{{ var|default('var is not defined') }}

{{ var.foo|default('foo item on var is not defined') }}

{{ var['foo']|default('foo item on var is not defined') }}

{{ ''|default('passed var is empty')  }}
Posted by: Guest on October-13-2021

Browse Popular Code Answers by Language