Override the style generated from display suite field template - Drupal
Sometimes we want to change the style of a field whose style is generated from display suite field template.
In template.php place the following code.
function mytheme_field__expert__title(&$variables) {
// Inspect the contents of $variables.
krumo($variables);
if ($variables['element']['#bundle'] == 'flexible_campaign_page') {
$variables['items'][0]['#markup'] = '<h1 class="gopi">' . $variables['element']['#object']->title . '</h1>';
}
// Pass back to the display suite theme function for final theming.
return theme_ds_field_expert($variables);
}
In template.php place the following code.
function mytheme_field__expert__title(&$variables) {
// Inspect the contents of $variables.
krumo($variables);
if ($variables['element']['#bundle'] == 'flexible_campaign_page') {
$variables['items'][0]['#markup'] = '<h1 class="gopi">' . $variables['element']['#object']->title . '</h1>';
}
// Pass back to the display suite theme function for final theming.
return theme_ds_field_expert($variables);
}
Comments
Post a Comment