Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

twig ternaire

{{ foo ? 'yes' : 'no' }}
{{ foo ?: 'no' }} is the same as {{ foo ? foo : 'no' }}
{{ foo ? 'yes' }} is the same as {{ foo ? 'yes' : '' }}
Source by twig.symfony.com #
 
PREVIOUS NEXT
Tagged: #twig #ternaire
ADD COMMENT
Topic
Name
2+6 =