Parse Sightly inside HTML comments

Avatar

Avatar

gareth_trufitt

Avatar

gareth_trufitt

gareth_trufitt

15-10-2015

Hello,

We're trying to add an IE8 stylesheet inside conditional comments, but because the parser ignores contents inside comments, it is not converted to a css link correctly:

<!--[if lte IE 8]> <meta data-sly-call="${clientLib.css @ categories='ourstlyes.iestyles'}" data-sly-unwrap></meta> <![endif]-->

Which gets rendered to:

<!--[if lte IE 8]> <meta data-sly-call="" data-sly-unwrap></meta> <![endif]-->

What would be the recommend approach here? I have tried pulling the comment into a different template with the same result. The other approach we were thinking was creating a a component for the comment opening and closing and outputting directly with: response.getWriter().print("<!--"); but this seem like a bit of a hack?

Thanks!

View Entire Topic

Avatar

Avatar

gareth_trufitt

Avatar

gareth_trufitt

gareth_trufitt

15-10-2015

Brilliant, that works, thank you!