Hi,

I have installed the excerpt module and it's working great.

However, I can't turn of the teaser for specific node types. Someone made a patch for 4.7 but that doesn't work with the 5.1 module. And I'm not skilled enough at php to make it work for the new version.

For instance: I have the weblinks module installed, and I don't need to have the teaser field enabled for this node type.

Anyone know how to do this?

thanks!

Comments

nasi’s picture

I haven't upgraded to 5.0 yet, so I don't know if things have changed (in fact I'm still running 4.6 on the site that uses excerpt.module).

You need to go to the content type configuration page: Admin -> Content Management -> Content Types -> {content type}, or admin/content/types/{content type}.

Here you can set whether each content type has manual or auto-generated teasers.

Hope that helps.

robotjox’s picture

Hi, thanks for the reply!

It doesn't matter if I set the content type to auto-generated or manual - the teaser text-area is still present regardless...

Can I perhaps work around it by hiding it in some other way - either by hacking the code or hiding it somehow in the theme?

Any help greatly appreciated!!!

nasi’s picture

That setting should turn excerpts on and off for the content type. if that doesn't work then the module is not functioning correctly. I assume that you are running the 4.7 version of the module in 5.x and hoping for the best. ;-) Sadly it would be unlikely to work without any modification.

There is no release of excerpt.module for 5.x and looking at the release history no work has been done on HEAD since the 4.7 release was made. It would seem that this module is not being actively maintained (indeed there is no mention of it here).

There has been work done on upgrading the module to 5.x at http://drupal.org/node/97494 but there are no comments from the module maintainer, which may be why nothing has been committed to CVS (assuming it is ready for that).

Your best bet would be to check out that issue and see if they have a solution that works for you.

nasi’s picture

I'm now upgrading to 5.x and so having the same problem as you.

I've found the Node Teaser module, which looks like a good replacement to excerpt with plenty of active development.

It seems like excerpt module will not be maintained any more unless someone takes over maintenance of the module.

dhovey’s picture

Although not a great solution, you can always go into the node_revisions table itself and delete the teaser column. It still leaves the formatting issue, but the teaser does not appear.

kimangroo’s picture

Anyone had any luck creating custom teasers for specific content types only with Drupal 5 and excerpt or node teaser or anything really?! Having teasers for forum questions/topics is really counter intuitive!

keesje’s picture

I think the module is not totally 5.x compatible.

I altered the "excerpt_form_alter" function:

function excerpt_form_alter($form_id, &$form) {
    $node = $form['#node'];
    
     if ($form_id == 'node_type_form') {
      $form['workflow']['excerpt']['excerpt_options'] = array(
        '#type' => 'radios',
        '#title' => t('Teasers'),
        '#default_value' => variable_get('excerpt_options_'. $form['#node_type']->type, 1),
        '#options' => array(t('Auto-generated'), t('Manual excerpt')),
        '#description' => t('Choose whether teasers are generated automatically or can be entered manually by the author.')
      );
    }
    
  if (isset($form['type'])) {
     if ($form['type']['#value'] .'_node_form' == $form_id && variable_get('excerpt_options_'. $form['type']['#value'], 1)) {
      $form['teaser'] = array(
        '#type' => 'textarea',
        '#title' => t('Teaser'),
        '#default_value' => $node->teaser,
        '#cols' => 60,
        '#rows' => 10,
        '#weight' => -17.5,
        '#description' => t('Enter an excerpt for this item. It will be shown on listing pages along with a <em>read more</em> link which leads to the full view. Leave empty to auto-generate one from the body.')
      );
    }
  
  }
}

If anyone can provide a patch against "5.x-1.x-dev 2007-Apr-21" it can be tested and applied. (although I have the feeling the author is not paying much attention to the module lately...)

Regards,

Kees

Webbased applicaties, content management systemen, websites, webdesign