Add class to template based on boolean field
You have written wrong logic in if statement. Correct way is following:

 $class = NULL;
 if (isset($node-&gt;field_boolean_field[LANGUAGE_NONE][0]['value']) &amp;&amp; $node-&gt;field_boolean_field[LANGUAGE_NONE][0]['value'] == 1 ) :
        $class = 'this-is-the-class';
 endif;