new mobile home #423

This commit is contained in:
2020-07-20 15:43:57 +02:00
parent 84d95267f6
commit 89d3753b74
9 changed files with 261 additions and 58 deletions
+21 -15
View File
@@ -109,22 +109,28 @@ function edlptheme_theme_suggestions_taxonomy_term_alter(&$suggestions, $variabl
}
function edlptheme_preprocess_edlp_home(&$vars){
foreach($vars['nodes'] as &$node){
switch($node['vm']){
case "image_2_columns":
$cols = 4;
break;
case "image_1_columns":
$cols = 2;
break;
case "text_1_column":
$cols = 2;
break;
default:
$cols = 3;
};
$node['cols'] = $cols;
// render the promoted_statics and promoted_prods
$promoteds = ['statics', 'prods'];
// dpm($vars);
foreach ($promoteds as $index => $p) {
foreach($vars['nodes_' . $p] as &$node){
switch($node['vm']){
case "image_2_columns":
$cols = 4;
break;
case "image_1_columns":
$cols = 2;
break;
case "text_1_column":
$cols = 2;
break;
default:
$cols = 3;
};
$node['cols'] = $cols;
}
}
}
function edlptheme_preprocess_taxonomy_term__entrees__mobile_home(&$vars){