how to get a node field value in a html.tpl.php template file? I have a field in a node type called body_styles. 

I need to modify html.tpl.php to get the value of body_styles to add it to the classes of the body tag.

I tried with dpm($node-&gt;content['body_styles']['#value']); but I get nothing. I think it is because $node is not available in html.tpl.php.

how do I get a node field value in a html.tpl.php template file?

@svetlio: almost done:

The class is correctly added to $variables['classes_array'] but if I inspect the body (see my capture below the code) tag is not there

    function omega_subtheme_2_preprocess_html(&amp;$variables, $hook) {
    if (arg(0) == 'node' &amp;&amp; is_numeric(arg(1))) {
        global $language;
        $node = entity_load_unchanged('node', arg(1));

        dpm($node -&gt; field_body_class['und'][0]['value']);

        if (isset($node -&gt; field_body_class['und'][0]['value']) &amp;&amp; $node -&gt; field_body_class['und'][0]['value']){
            $variables['classes_array'][] = $node -&gt; field_body_class['und'][0]['value'];
            dpm($variables['classes_array']);
        }
  }
Another way - without edit template and adding code in template.php

function THEME_preprocess_html(&amp;$variables, $hook) {
    if (arg(0) == 'node' &amp;&amp; is_numeric(arg(1))) {
      $node = entity_load_unchanged('node', arg(1));

      if (isset($node -&gt; field_FIELD_NAME['und'][0]['value']) &amp;&amp; $node -&gt; field_FIELD_NAME['und'][0]['value']) {
        $variables['classes_array'][] = $node -&gt; field_FIELD_NAME['und'][0]['value'];
      }
    }
  }


replace THEME with your theme_name and FIELD_NAME with your field_name, clear the cache

edit: I change "$node = entity_load('node', arg(1));" to $node = "entity_load_unchanged('node', arg(1));"