1 In Views areas (header, footer, empty-text) are pluggable, this means you can write your own php logic to place whatever you want.
4 You should have read
<a href=
"topic:views/api">API
</a> and
<a href=
"topic:views/api-tables">Tables API
</a> to get a basic knowledge
7 <h3>Create your own area handler
</h3>
9 The first step is to tell views: Hey i want to add a new area handler.
10 Therefore you have to implement hook_views_data and add a new one. For example:
13 function yourmodule_views_data() {
14 $data['views']['collapsible_area'] = array(
15 'title' =
> t('Collabsible Text area'),
16 'help' =
> t('Provide collabsible markup text for the area.'),
18 'handler' =
> 'yourmodule_handler_collapsible_area_text',
24 The second step is to write this handler. Therefore create a file called yourmodule_handler_collapsible_area_text.inc and
25 add it to the .info file of your module.
27 Then add content to your area file like this:
29 class yourmodule_handler_collapsible_area_text extends views_handler_area_text {
30 function render($empty = FALSE) {
31 // Here you just return a string of your content you want.
32 if ($render = parent::render($empty)) {
34 '#type' =
> 'fieldset',
35 '#title' =
> t('Title'),
36 '#value' =
> $render,
38 $output = theme('fieldset', $element);
45 As on every handler you can add options so you can configure the behavior. If the area isn't shown yet in the views interface, please clear the cache :)