Skip to content
Snippets Groups Projects
Commit 5f283a85 authored by Stephen Mustgrave's avatar Stephen Mustgrave
Browse files

Issue #2540450 by aleksijohansson, ohthehugemanatee, k.skarlatos: Allow HTML...

Issue #2540450 by aleksijohansson, ohthehugemanatee, k.skarlatos: Allow HTML in tab title setting in views style plugin
parent 94f88abd
No related branches found
No related tags found
No related merge requests found
......@@ -15,6 +15,7 @@ class quicktabs_style_plugin extends views_plugin_style {
$options = parent::option_definition();
$options['tab_style'] = array('default' => 'default');
$options['tab_title_field'] = array('default' => NULL);
$options['html'] = array('default' => 0);
return $options;
}
......@@ -58,6 +59,13 @@ class quicktabs_style_plugin extends views_plugin_style {
'#weight' => -3,
);
}
$form['html'] = array(
'#type' => 'checkbox',
'#title' => t('Allow HTML in title'),
'#description' => t('This defines whether the tab "leaf" can have rendered HTML in it. Select if you want to for example render and image field as the tab title.'),
'#default_value' => $this->options['html'],
);
}
// Ensure we have all the settings necessary to render into tabs.
......@@ -136,7 +144,7 @@ class quicktabs_style_plugin extends views_plugin_style {
}
}
$overrides = array('style' => $this->options['tab_style'], 'sorted' => TRUE);
$overrides = array('style' => $this->options['tab_style'], 'sorted' => TRUE, 'html' => $view->style_options['html']);
$quicktabs = quicktabs_build_quicktabs($qt_name, $overrides, $tabs);
$output = drupal_render($quicktabs);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment