Based on my investigation, the problem is caused when passing a parameter instance.icon_left or instance.icon_right from templates/djangocms_bootstrap4/link/default/link.html to templates/djangocms_icon/includes/icon.html
{% with icon_class=instance.icon_left instance=instance.icon_left %}{% include "djangocms_icon/includes/icon.html" %}{% endwith %}
<i class="{{ instance.icon }}...</i>
Instance.icon_left or instance.icon_right is String type
instance in icon.html is Icon Instance
The String type does not have icon property, so it will render empty string by errors
The easy is to create a custom template for templates/djangocms_icon/includes/icon.html, as follows
{% load cms_tags %}<i class="{% if icon_class %}{{ icon_class }}{% else %}{{ instance.icon }}{% endif %}{% if instance.attributes.class %} {{ instance.attributes.class }}{% endif %}" aria-hidden="true"{% for key, value in instance.attributes.items %}{% if key != 'class' %}{{ key }}="{{ value }}" {% endif %}{% endfor %}></i>
@atlonxp I think this should be fixed in djangocms-bootstrap4 itself, either by providing the correct contextual value or an alternative template. Can you open it there with a reference to this issue?
icon class is not rendered correctly.
<i class="" aria-hidden="true"></i>
Based on my investigation, the problem is caused when passing a parameter
instance.icon_left
orinstance.icon_right
from templates/djangocms_bootstrap4/link/default/link.html to templates/djangocms_icon/includes/icon.html{% with icon_class=instance.icon_left instance=instance.icon_left %}{% include "djangocms_icon/includes/icon.html" %}{% endwith %}
<i class="{{ instance.icon }}...</i>
Instance.icon_left
orinstance.icon_right
is String typeinstance
in icon.html is Icon InstanceThe easy is to create a custom template for templates/djangocms_icon/includes/icon.html, as follows
{% load cms_tags %}<i class="{% if icon_class %}{{ icon_class }}{% else %}{{ instance.icon }}{% endif %}{% if instance.attributes.class %} {{ instance.attributes.class }}{% endif %}" aria-hidden="true"{% for key, value in instance.attributes.items %}{% if key != 'class' %}{{ key }}="{{ value }}" {% endif %}{% endfor %}></i>