Front class not included in body tag in my custom module We are trying to make a Drupal mini bootstrap for our language selection module.
We implemented hook_boot(), in this function, we included path.inc and common.inc from core.

The language selector always redirects to the frontpage of the according language.
Now the problem is that, when loading the new page, the class of &lt;body&gt; is not-front. This means that front-specific styles, and template are not used; it just uses the default ones.

We are guessing that we missed something in the Drupal bootstrap process.

Do you have any idea?
If memory serves me correct the "front" class will only be set on the body, if the URL you are on matches what is set in the "Site Information" > Front Page field.

My guess is that you'll need to override the string or array of body classes in the template.php file of your theme. To do this you'd want to use the template_preprocess_html function provided by Drupal core.

Here is a quick and dirty example of how to add the class to the body of your theme:

function THEMENAME_preprocess_html(&amp;$variables) {

  if (theme_get_setting('my_variable') == 0) {
    $variables['classes_array'][] = 'front';
  }

}


From there you'd need to figure out what classifies the home page as the home page with some conditionals or custom functions.