How do I limit Node teaser to only displaying customizable form fields for one node type?
I have tried other modules for achieving this (excerpt and cck node teaser field) but none of these worked.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | nodeteaser_nodetypes_disabled.patch | 2.23 KB | kepi |
Comments
Comment #1
emilyf commentedI was looking for the same thing and ended up hacking the node teaser module. Do a search for
function nodeteaser_form_alterand then in that function you would change this line:
if (isset($form['type']) && $form_id == $form['type']['#value'] . '_node_form') {to:
if (isset($form['type']) && $form_id == 'YOURCONTENTTYPEHERE_node_form') {Put the name of your content type where it says 'YOURCONTENTTYPEHERE' above. You can find the correct name by going to admin/content/types and rolling over the 'edit' link of your content type.
So, if you have a content type called 'news' that you want only want the teaser to show up on, it would be:
if (isset($form['type']) && $form_id == 'news_node_form') {BTW, I do think this would be a good feature to build in to Node Teaser module!!!
Comment #2
kepi commentedI made small enhancement which allow administrator to set disabled content types, so in your case (only one node type) just disable all nodes instead this one. I think that it is proper behavior, cause we want to have node teaser enabled by default (in case off adding new content type).
I'm not sure if it is done right way, I have no experience with drupal modules.
Comment #3
pioters commentedThis patch works for me fine. Thanks