<?php

// 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__' . $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;
$vars['theme_hook_suggestions'][] = 'field__' . $b . '__' . $fn;



if($fn == 'body' && $b == 'thematique'){

  $vars['items'][0] = array(
    'summary' =>array(
      "#type"=>"markup",
      "#markup"=>$element['#items'][0]['safe_summary'],
      "#prefix"=>"<div class='summary'>",
      "#suffix"=>"</div>",
    )
  );
  if($vm == 'accueil' ){
    $vars['items'][0]['value'] = array(
      "#type"=>"markup",
      "#markup"=>$element['#items'][0]['safe_value'],
      "#prefix"=>"<div class='value'>",
      "#suffix"=>"</div>",
    );
  }

}
