/ Published in: PHP
A form alter to gove Drupal a separate teaser field.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/** * Implementation of hook_form_alter(). */ function separate_teaser_form_alter($form_id, &$form) { '#type' => 'textarea', '#title' => t('Teaser'), '#description' => t('The teaser is used as short introduction of this post. It is displayed in all sorts of listings. If this is left empty, the system will create a teaser automatically.'), '#weight' => $weight, '#default_value' => $node->teaser, '#required' => $required, ); } }
URL: http://drupal.org