Reputation: 1274
I would like to use the ternary operator of Twig but it shows me the HTML tags as text.
{{ (sender.firstName or sender.lastName) ? "<strong>#{sender.firstName} #{sender.lastName}</strong>" : '<strong>Unknown</strong>' }}
The result is <strong>My Name</strong>
but it should be My Name.
Upvotes: 0
Views: 214