- Issue created by @mabho
- Merge request !28Issue #3513127 by mabho: Remove an empty link class attribute → (Open) created by mabho
When the admin user opts for field formatter Font Awesome icons
instead of Network name
, a value for the class attribute of the link tag (<a />
) is not provided. That causes an empty
class
attribute to be rendered on the source code.
Create a social link field and select field formatter Font Awesome icons
. Create content and add a social media link reference. When rendered, inspect the source code and confirm there is an empty class
attribute.
Apply logic to the template so that the empty class attribute is not rendered. The code needs to check if the output link.class
is not empty prior to printing it.
Apply logic to the TWIG template.
Empty attribute class
is not rendered on the template anymore.
--
--