I've been attempting to get the Block Class module working with Hexagon, but I'm having trouble figuring it out. I can see that the ID and classes are generated in hex_pre_preprocess(), so plugging in the Block Class code the normal way doesn't work. I've tried appending data to $vars['classes_array'] in my preprocess_block function, but haven't had luck yet.

Any hints to get me going in the right direction would be greatly appreciated. Thanks!

- David

CommentFileSizeAuthor
#3 context_block_class.tgz455 bytespenguininja
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

penguininja’s picture

I've found the easiest way to do this is to write a custom plugin for Hexagon. (We're actually using the Context Block Classes module, but same concept.)

I started with the Skinr plugin included in Hexagon Base (/HexagonBase/plug-ins/module_compatibility/skinr), copied it to a plugins folder in my sub-theme, renamed it, then replaced the Skinr variables with the Context Block Class ones.

Let me know if you have any questions about this, I'm happy to help.

dnewkerk’s picture

Hi Candice -

Thanks for the pointer in the right direction :) If you have a chance, would you be able to paste the code of your customized plugin for me to study?

Oh and thanks for mentioning Context Block Classes - that's pretty cool, will have to keep that in mind. I might even switch the site I'm working on to using Context in any case.

penguininja’s picture

FileSize
455 bytes

No problem, my context_block_class plugin is attached (adapted from the skinr module helper plugin).

penguininja’s picture

If anyone else is interested in this, I've created a new project for the context block class plugin at http://code.funnymonkey.com/project/context_block_class_module