Thanks for such a great module. I'm currently using it to have different block theme templates for specifying blocks to appear with a defined colour set. This works great for the blocks which all appear down the right hand column of the website I'm working on. However, I also need a set to appear on either the left hand side, or the right hand side of the left hand "main content area". Instead of having a different template - one with a class called "left" and one with a class called "right" - is it possible to input classes into the block as php printed variables? And if so how do you do this?

I'm assuming it's to do with the variables part of the block config (see attached screenshot) but I don't know how to print the values of these variables in the template.

Any help would be much appreciated!

Comments

amateescu’s picture

Status: Active » Fixed

Sorry for the lack of documentation on this.. I'll add this info to README.txt in the next release.

The variables defined in the block conf. page are available in the template file as an array in the $blocktheme_vars variable.

For your specific example, you can print that class name with $blocktheme_vars['alignment'].

Also, to find this kind of information easier in the future, you should use the devel module and write a <?php dsm($variables); ?> in your template to see what variables are available in that file.

vaccinemedia’s picture

Great stuff thanks for getting back to me so quickly. I'll give it a try :)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.