Error message

User warning: The following theme is missing from the file system: responsive_green. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1143 of /var/www/moscovie.com/includes/bootstrap.inc).

Add new comment

Два простых способа отобразить контент в сворачиваемых блоках

Нам необходимо отобразить контент в виде сворачивающихся блоков как это сделать.

Первый способ

drupal_add_js('misc/form.js');
drupal_add_js('misc/collapse.js');

$collapsible_item = array('element' => array());
$collapsible_item['element']['#title'] = "This is the text / html you will on to open and close content.";
$collapsible_item['element']['#description'] = "This is the html you want be collapsible";
$collapsible_item['element']['#children'] = t('This is main text in fieldset! Table contains link for edit node');
$collapsible_item['element']['#attributes']['class'][] = 'collapsible';
// Leave this next line off if you want it un-collapsed by default.
$collapsible_item['element']['#attributes']['class'][] = 'collapsed';
$html_of_the_entire_collapsible_item = theme('fieldset', $collapsible_item);


Второй способ
, с помошью модуля C-tools

print theme(
'ctools_collapsible',
array(
'handle' => 'Click me and you will see collapsed content',
'content' => $collapsed_content,
'collapsed' => TRUE
)
);

Категория: 
The code has been tested and works
Мультитег: 

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.