danielebarchiesi@0: In Views areas (header, footer, empty-text) are pluggable, this means you can write your own php logic to place whatever you want. danielebarchiesi@0: danielebarchiesi@0:

Requirements

danielebarchiesi@0: You should have read API and Tables API to get a basic knowledge danielebarchiesi@0: how to extend views. danielebarchiesi@0: danielebarchiesi@0:

Create your own area handler

danielebarchiesi@0: danielebarchiesi@0: The first step is to tell views: Hey i want to add a new area handler. danielebarchiesi@0: Therefore you have to implement hook_views_data and add a new one. For example: danielebarchiesi@0: danielebarchiesi@0:
danielebarchiesi@0: function yourmodule_views_data() {
danielebarchiesi@0:   $data['views']['collapsible_area'] = array(
danielebarchiesi@0:     'title' => t('Collabsible Text area'),
danielebarchiesi@0:     'help' => t('Provide collabsible markup text for the area.'),
danielebarchiesi@0:     'area' => array(
danielebarchiesi@0:       'handler' => 'yourmodule_handler_collapsible_area_text',
danielebarchiesi@0:     ),
danielebarchiesi@0:   );
danielebarchiesi@0: }
danielebarchiesi@0: 
danielebarchiesi@0: danielebarchiesi@0: The second step is to write this handler. Therefore create a file called yourmodule_handler_collapsible_area_text.inc and danielebarchiesi@0: add it to the .info file of your module. danielebarchiesi@0: danielebarchiesi@0: Then add content to your area file like this: danielebarchiesi@0:
danielebarchiesi@0: class yourmodule_handler_collapsible_area_text extends views_handler_area_text {
danielebarchiesi@0:   function render($empty = FALSE) {
danielebarchiesi@0:     // Here you just return a string of your content you want.
danielebarchiesi@0:     if ($render = parent::render($empty)) {
danielebarchiesi@0:       $element = array(
danielebarchiesi@0:         '#type' => 'fieldset',
danielebarchiesi@0:         '#title' => t('Title'),
danielebarchiesi@0:         '#value' => $render,
danielebarchiesi@0:       );
danielebarchiesi@0:       $output = theme('fieldset', $element);
danielebarchiesi@0:       return $output;
danielebarchiesi@0:     }
danielebarchiesi@0:   }
danielebarchiesi@0: }
danielebarchiesi@0: 
danielebarchiesi@0: danielebarchiesi@0: 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 :)