I want to set Omega4 Layout defaults based on Content Type. I am trying to use the following code, but the hook_omega_layout_alter doesn't seem to use the $node variable. What am I missing?
I have already referenced Omega override simple-layout.tpl.php for content types but, once I try and and a switch statement based of $node->type it stops working.
What can I do to set the default Omega4 Layout based on Content Type using the hook_omega_layout_alter function?
function THEME_omega_layout_alter(&$vars, &$layout) {
$node = $vars['node'];
switch ($node->type) {
case "article":
$layout = 'article';
break;
case "blog":
$layout = 'blog';
break;
case "market":
$layout = 'market';
break;
case "merchant":
$layout = 'merchant';
break;
case "product":
$layout = 'product';
break;
case "update":
$layout = 'update';
break;
}
}