You need to wrap it as a string: "<svg .... >"
. But you will run into nesting problems with the other "
, inner '
- too many levels. That’s why it’d be better to move that code into a page method:
public function marriedIcon()
{
if ($page->married()->toBool()) {
return '<svg style="display: inline-block" aria-hidden="true" class="k-icon"><use xlink:href="#icon-check" /></svg>';
}
}
text: "{{ page.title }} | {< page.marriedIcon >} | {{ page.content.images.toFiles.count }} images"