{% spaceless %} {# Copied from admin, I kept the wrapped parameter as it can be useful in some situations #} {% if wrapped %}{% endif %} {% if svg_content %} {# Handle filename case - inject the SVG content directly #} {% load static %} {{ svg_content|safe }} {% elif name %} {# Handle name case - use Wagtail's icon system #} {% else %} {# No icon found - render nothing or placeholder #} {% endif %} {% if title %} {{ title }} {% endif %} {% if wrapped %}{% endif %} {# Make sure this file _doesn’t_ end with a final newline. It can break rendering. #} {% endspaceless %}