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

If your table is rendered using theme() function like theme_table('table'), you can preprocess it from your theme function.

For theme_table() you can add class to every table like this in template.php of your theme.

function my_theme_preprocess_table(&$variables) {
  $variables['attributes']['class'][] = 'table';
}

If your table rendered using theme() function like theme_table(), you can preprocess it from your theme function.

For theme_table() you can add class to every table like this in template.php of your theme.

function my_theme_preprocess_table(&$variables) {
  $variables['attributes']['class'][] = 'table';
}

If your table is rendered using theme('table'), you can preprocess it from your theme function.

function my_theme_preprocess_table(&$variables) {
  $variables['attributes']['class'][] = 'table';
}
Source Link
Abi أب
  • 429
  • 3
  • 7

If your table rendered using theme() function like theme_table(), you can preprocess it from your theme function.

For theme_table() you can add class to every table like this in template.php of your theme.

function my_theme_preprocess_table(&$variables) {
  $variables['attributes']['class'][] = 'table';
}