3

Is there a way to set CSS classes to blocks when creating them via hook_block_info and hook_block_view? I tried to use '#attributes', '#classes_array' and '#attributes_array' options but with no success. I understand that I can do it in preprocess function but I believe this is not a right way.

1
  • 1
    Hi @Aleksey, welcome to Drupal Answers. To improve your question and increase the likelihood of getting a good answer, please add the Drupal core version as a tag. That's "7" for Drupal 7 and "8" for Drupal 8. Thanks! Commented Feb 4, 2017 at 11:06

0

Browse other questions tagged or ask your own question.