I feel like this should be easy, but I can't figure it out. I've created two content types using CCK. When creating content, one of these content types has the Title field as Optional and the other has it as Required. I can't figure out where I configured these settings. How do I make the Title field optional? Thanks.

Comments

dnewkerk’s picture

The title field is never optional, as all Drupal nodes "must" have a title stored for them. However, what you can do is use Automatic Nodetitles module to setup the creation of an automatic title (based on predefined settings, including the use if you want of tokens such as the date, CCK fields, etc). You can then set the Title field not to show on the form.

On the side of displaying the title or not when the node is viewed (as a page) on the site, you could use a preprocess_page function in template.php to set the title to '' (nothing) when it is requested for that content type... in fact, found a guide for that: Hide the Node Title on a Page. To remove it from the teasers of the nodes, you could do a similar approach using preprocess_node instead, or could make a node-yourtype.tpl.php and remove the $title there.