Finbarr
Finbarr

Reputation: 32126

Prevent users editing node titles

Is it possible to prevent a user from editing the title of a node on the node edit screen?

One of the things I really detest about Drupal is the rigidity of the title & body field in each node.

Upvotes: 3

Views: 1104

Answers (3)

sophie jones
sophie jones

Reputation: 1

If anyone is still interested in drupal7, you can use [title module][1]

[1]: https://www.drupal.org/project/title and turn title to a text field, you then can use [field_permissions module][1]

[1]: https://www.drupal.org/project/field_permissions and set it up however you like by creating a custom permission. The combination of these two module is really flexible.

Upvotes: 0

bmann
bmann

Reputation: 86

Expanding on the tip of hiding the body field, if you use CCK and turn on Content Permissions, you can set field-level permissions, and have a "body" field that shows / is editable however you set role permissions.

Upvotes: 1

Scott Reynen
Scott Reynen

Reputation: 3550

Two ways you can do this:

1) Write a hook_form_alter function to set #access to FALSE. This is really quick if you're familiar with writing modules, but if not, you'll probably prefer:

2) Use Automatic Nodetitles to hide the title field completely, create a standard text CCK field to replace it, and then use Content Permissions (which comes with CCK) to restrict access to the new field.

(Also, while the title field is indeed a pain to hide, you can hide the body field just by setting the label to blank.)

Upvotes: 5

Related Questions