How do I make a complex grid layout with the Omega theme where regions can be embedded in regions? I included an image of how I want the page layout to be set. Right now I'm thinking that I will use the CSS property in the Views UI to manually set the grid-[columns] and alpha or omega properties of the Views block. Is there a better way of doing this so the code is in a logical place and not a hack?
2 Answers
For something like this, I will simply use the Block Class module and for the blocks I'm placing inside a region, add a grid-X and alpha/omega appropriate classes as needed.
I've never found the reason (even in really advanced layouts/designs/grids) to do anything more than that...
-
What I realized is that it didn't help changing the view css because it wrapped in block markup neither did using a view attachment. Rather than have another database query I just went ahead and added the class into a helper module through HOOK_preprocess_block(&$vars).
function helper_preprocess_block(&$vars) { if ($vars['block']->delta == "50a597852ade9b54514cbd206a5baa2a") { $vars['classes_array'] = array_merge($vars['classes_array'], array('grid-4 omega')); } }
– Adam SCommented Jun 12, 2011 at 22:31
Use the views_column_class module (http://drupal.org/project/views_column_class).
This lets you add alpha, omega and other settings to views so that they don't break your grid.