-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Icons aren't rendered / API mismatch with djangocms-icon #124
Comments
Is the issue still current, or can the issue be closed? |
It seems to be still current with no fix. |
Problem is still. When i choose icon left and/or icon-right when using bootstrap-link plugin and save plugin. It renders the link and all of it options except no icon: |
A work around would be to provide your own
You might want to think about adding some spacing to avoid the icon being right next to your link text. |
@fsbraun But now you'l break icon plugin. With an if else it is solved. |
I've taken the above approach in djangocms-frontend (https://github.com/fsbraun/djangocms-frontend) which supports Bootstrap 5. 😄 |
should this workaround fix that the icon not appear when use with link inside django_ckeditor ? |
As explained in #101 (comment), the
Bootstrap4LinkPlugin
currently usesdjangocms_icon
Icon
fields forleft_icon
andright_icon
. These are specialCharField
s, so the following part in thelink/default/link.html
template setsinstance
to a string:This is not consistent with the implementation of
djangocms_icon
, specifically theincludes/icon.html
template, which expects,instance
to be an instance of theIcon
model. As strings have neither anicon
field nor anattributes
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 theIcon
field? If you want, I can send a PR that's effectively the solution from the comment on the other issue mentioned above.The text was updated successfully, but these errors were encountered: