Created
August 3, 2015 10:52
-
-
Save blackice2999/a473099551dd4445c4dd to your computer and use it in GitHub Desktop.
Drupal 8 - How to add classes to link (render array) without using preprocess....
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Had similar issue, but im displaying terms rendered as labels, i need to add some of my own classes.
In my code, this:
link['#attributes']['class']
is null so i came up with this. Also, in the top of the twig i do some logic to understand which class associate to the term.