Description
As explained in #101 (comment), the Bootstrap4LinkPlugin
currently uses djangocms_icon
Icon
fields for left_icon
and right_icon
. These are special CharField
s, so the following part in the link/default/link.html
template sets instance
to a string:
{% with icon_class=instance.icon_left instance=instance.icon_left %}
{% include "djangocms_icon/includes/icon.html" %}
{% endwith %}
This is not consistent with the implementation of djangocms_icon
, specifically the includes/icon.html
template, which expects, instance
to be an instance of the Icon
model. As strings have neither an icon
field nor an attributes
field, nothing is actually rendered and the icon is missing on the site.
Is this a holdover from some old version? Are the two plugins not supposed to be compatible at their respective latest versions? Was this plugin simply not updated (yet)? What is the intended behavior?
Should Bootstrap4Link
switch to a foreign key or change the template to just use the css class string from the Icon
field? If you want, I can send a PR that's effectively the solution from the comment on the other issue mentioned above.