Open Konafets opened 1 year ago
Antlers support the concept of interpolated statements, which means, one can insert Antlers into a Antlers node:
{{ items = {collection:products sort="rating:desc" limit="5"} }}
While this already works, I discovered a special case, where an Antlers switch statement is inserted into the string value of a class attribute:
switch
class
{{ svg :src="type" alt="" aria-hidden="true" class=" h-5 w-5 fill-current motion-safe:transition-colors { switch( (type == 'success') => 'text-green-800', (type == 'notice') => 'text-yellow-800', (type == 'error') => 'text-red-800', () => 'text-gray-800' )} " }}
Antlers support the concept of interpolated statements, which means, one can insert Antlers into a Antlers node:
While this already works, I discovered a special case, where an Antlers
switch
statement is inserted into the string value of aclass
attribute: