1. cis7 sites/all/modules/ulmus/views/help/api-handler-area.html
  2. cle7 sites/all/modules/ulmus/views/help/api-handler-area.html
  3. ecd7 sites/all/modules/ulmus/views/help/api-handler-area.html
  4. elmsmedia7 sites/all/modules/ulmus/views/help/api-handler-area.html
  5. harmony7 sites/all/modules/ulmus/views/help/api-handler-area.html
  6. icor7 sites/all/modules/ulmus/views/help/api-handler-area.html
  7. meedjum_blog7 sites/all/modules/ulmus/views/help/api-handler-area.html
  8. mooc7 sites/all/modules/ulmus/views/help/api-handler-area.html


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

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
how to extend views.

<h3>Create your own area handler</h3>

The first step is to tell views: Hey i want to add a new area handler.
Therefore you have to implement hook_views_data and add a new one. For example:

function yourmodule_views_data() {
  $data['views']['collapsible_area'] = array(
    'title' =&gt; t('Collabsible Text area'),
    'help' =&gt; t('Provide collabsible markup text for the area.'),
    'area' =&gt; array(
      'handler' =&gt; 'yourmodule_handler_collapsible_area_text',

The second step is to write this handler. Therefore create a file called yourmodule_handler_collapsible_area_text.inc and
add it to the .info file of your module.

Then add content to your area file like this:
class yourmodule_handler_collapsible_area_text extends views_handler_area_text {
  function render($empty = FALSE) {
    // Here you just return a string of your content you want.
    if ($render = parent::render($empty)) {
      $element = array(
        '#type' =&gt; 'fieldset',
        '#title' =&gt; t('Title'),
        '#value' =&gt; $render,
      $output = theme('fieldset', $element);
      return $output;

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 :)



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.