Posted by salomos on October 7, 2012 at 7:20am
Is there any way to remove the whole block (Menu settings, Revisions information, URL path settings....) located at the bottom of the "ADD New Content" function page? I want an end user to be able to "Add New Content" but want to have all of these settings as a default that I choose to be saved as. Can I do this from a custom .tpl file or is there another way?
Comments
If you go to roles (user
If you go to roles (user roles) there you can decide what user type can do what.
Drupal will only show the parts they have access to.
So you don't need a template to change it, it can all be managed in drupal user roles.
Do you mean?
Do you mean that they can still ADD the new content but do not have to see the block that sets all of the settings?
The items that are shown are
The items that are shown are dependent upon the permissions of the viewer. So the user will only see the items they have permission to see. So if you remove the permission that gives the user permission to see these settings, the settings will not be shown.
You can also override individual items in hook_form_alter() settings #access to false. For example, if you have a section named 'node_tags', you can remove it like this:
<?phpfunction my_module_form_alter(&$form, &$form_state, $form_id)
{
if($form_id == 'something_node_form')
{
$form['node_tags']['#access'] = FALSE;
}
}
?>
This tells the rendering engine not to show this element.
Jaypan We build websites
Thanks one more question, please.
Can I also do this with the field Title? I would like to set a default value for this field and never show it to the Content Editor. Should I do this in a similar manner or should I change the actual title of this field to be an actual field I will always need? Did that make sense to you?