refactoring and a lot of new design

This commit is contained in:
2017-02-10 18:07:21 +01:00
parent 30577d3c6b
commit 290b8ac157
9 changed files with 696 additions and 186 deletions
@@ -1,8 +1,33 @@
<?php
<?php
//dsm($vars);
// dsm($vars);
$element = $vars['element'];
$vm = $element['#view_mode'];
$ft = $element['#field_type'];
$fn = $element['#field_name'];
$b = $element['#bundle'];
$vars['theme_hook_suggestions'][] = 'field__' . $vars['element']['#view_mode'];
$vars['theme_hook_suggestions'][] = 'field__' . $vars['element']['#field_type'] . '__' . $vars['element']['#view_mode'];
$vars['theme_hook_suggestions'][] = 'field__' . $vars['element']['#field_name'] . '__' . $vars['element']['#view_mode'];
$vars['theme_hook_suggestions'][] = 'field__' . $vm;
$vars['theme_hook_suggestions'][] = 'field__' . $ft . '__' . $vm;
$vars['theme_hook_suggestions'][] = 'field__' . $fn . '__' . $vm;
$vars['theme_hook_suggestions'][] = 'field__' . $fn . '__' . $vm;
$vars['theme_hook_suggestions'][] = 'field__' . $b . '__' . $fn . '__' . $vm;
if($fn == 'body' && $vm == 'accueil' && $b == 'thematique'){
$vars['items'][0] = array(
'summary' =>array(
"#type"=>"markup",
"#markup"=>$element['#items'][0]['safe_summary'],
"#prefix"=>"<div class='summary'>",
"#suffix"=>"</div>",
),
'value' =>array(
"#type"=>"markup",
"#markup"=>$element['#items'][0]['safe_value'],
"#prefix"=>"<div class='value'>",
"#suffix"=>"</div>",
)
);
}