rendered paste body/* generates a list of body classes for bad-ass per-page CSS hacking */function civicspace_get_body_classes($sidebar_left, $sidebar_right) { $body_classes = array(); if (strlen($sidebar_left) && strlen($sidebar_right)) { $body_classes[] = 'three-column'; } else if (strlen($sidebar_left)) { $body_classes[] = 'two-column'; } else if (strlen($sidebar_right)) { $body_classes[] = 'two-column-right'; } else { $body_classes[] = 'one-column'; } if ($_GET['q'] == variable_get('site_frontpage', 'node')) { $body_classes[] = 'home'; } if (arg(1)) { $body_classes[] = check_plain(arg(0)) . '-' . check_plain(arg(1)); } if ($node->type) { $body_classes[] = $node->type; } $path_class = explode('/', drupal_get_path_alias(check_plain($_GET['q']))); $body_classes[] = reset($path_class); $body_classes[] = preg_replace('/-\d+/', '', str_replace('/', '-', check_plain($_GET['q']))); $body_classes[] = 'page-' . str_replace('/', '-', check_plain($_GET['q'])); return $body_classes;}