Skip to main content
deleted 224 characters in body
Source Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284

flocondetoile its ok@flocondetoile's answer is OK, but the correct way it'sis using drupal_html_class()

Example in you custom module:.

function YOURMODULE_preprocess_block(&$variables) {
    $variables['classes_array'][] = drupal_html_class('your-custom-class');
}
function YOURMODULE_preprocess_block(&$variables) {
  $variables['classes_array'][] = drupal_html_class('your-custom-class');
}

Example in you customThe function can be used from a module, or a theme (in template.php):

function YOURTHEME_preprocess_block(&$variables) {
    $variables['classes_array'][] = drupal_html_class('your-custom-class');
}

flocondetoile its ok, but the correct way it's using drupal_html_class()

Example in you custom module:

function YOURMODULE_preprocess_block(&$variables) {
    $variables['classes_array'][] = drupal_html_class('your-custom-class');
}

Example in you custom theme (in template.php):

function YOURTHEME_preprocess_block(&$variables) {
    $variables['classes_array'][] = drupal_html_class('your-custom-class');
}

@flocondetoile's answer is OK, but the correct way is using drupal_html_class().

function YOURMODULE_preprocess_block(&$variables) {
  $variables['classes_array'][] = drupal_html_class('your-custom-class');
}

The function can be used from a module, or a theme.

Source Link
Capy
  • 443
  • 3
  • 6

flocondetoile its ok, but the correct way it's using drupal_html_class()

Example in you custom module:

function YOURMODULE_preprocess_block(&$variables) {
    $variables['classes_array'][] = drupal_html_class('your-custom-class');
}

Example in you custom theme (in template.php):

function YOURTHEME_preprocess_block(&$variables) {
    $variables['classes_array'][] = drupal_html_class('your-custom-class');
}