You are here

function oa_core_add_layout_class in Open Atrium Core 7.2

Add the given layout name as a body class on the page

Parameters

$name of layout. The node: part is skipped:

$prefix optional prefix for the class:

2 calls to oa_core_add_layout_class()
oa_core_add_node_class in includes/oa_core.util.inc
Add the node layout as a body class to the page
oa_core_add_taxonomy_class in includes/oa_core.util.inc
Add the taxonomy layout as a body class to the page

File

includes/oa_core.util.inc, line 1854
Code for Utility functions for OpenAtrium spaces

Code

function oa_core_add_layout_class($name, $prefix = '') {
  $list = explode(':', $name);
  $prefix = !empty($prefix) ? $prefix . '-' : '';
  if (count($list) > 1) {
    $class_name = $prefix . $list[1];
    if (count($list) > 2) {
      $class_name .= '-' . $list[2];
      oa_core_body_classes(drupal_html_class($class_name));
    }
  }
}