theme_ctools_collapsible

Versions
6
theme_ctools_collapsible($handle, $content, $collapsed = FALSE)

Render a collapsible div.

Parameters

$handle Text to put in the handle/title area of the div.

$content Text to put in the content area of the div, this is what will get collapsed

$collapsed = FALSE If true, this div will start out collapsed.

Code

contributions/ctools/includes/collapsible.theme.inc, line 37

<?php
function theme_ctools_collapsible($handle, $content, $collapsed = FALSE) {
  ctools_add_js('collapsible-div');
  ctools_add_css('collapsible-div');

  $class = $collapsed ? ' ctools-collapsed' : '';
  $output = '<div class="ctools-collapsible-container' . $class . '">';
  $output .= '<div class="ctools-collapsible-handle">' . $handle . '</div>';
  $output .= '<div class="ctools-collapsible-content">' . $content . '</div>';
  $output .= '</div>';

  return $output;
}
?>

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters (without spaces) shown in the image.