开发者

how to remove the publishing options in drupal

开发者 https://www.devze.com 2022-12-30 16:34 出处:网络
I am using work flow module. I dont want th开发者_运维问答e publishing options to be displayed while we are trying to create a page .

I am using work flow module. I dont want th开发者_运维问答e publishing options to be displayed while we are trying to create a page . How is it possible..


The best solution I've found for this exact problem is to disable administer nodes permission for all users who's involved in the publication workflow. This will hide the publishing options for all users. What you'll aim for is to let the system handle the publication, and not the users.

If you combine the Workflow module with modules Revisioning, Actions and Trigger you can trigger an action that publishes your page when your content reaches the final workflow status. The process is more or less documented in the documentation for http://drupal.org/project/revisioning.

I have setup this with statuses Draft, For review, Needs work and Approved for our Intranet. When a publisher set content into Approved status, the Trigger/Action modules handles the publication of the content.


The publishing options fieldset is displayed for users who have the administer nodes permission. Keep in mind that while you may see it if you are a member of a role that has been granted the permission (or are logged in as user #1), other users who have other roles will not have access to it. Make sure to view the form as a user with the same permissions as the users who will be using the form, not just with an administrative account.

If you need better control over the fieldset's display, then you will have to use hook_form_alter as sprugman mentioned.


Assuming you're comfortable with PHP, the best way is probably with the FAPI. You'll need to hook_form_alter the node creation form for the insert state. It might be best to change the type of the fields to hidden inputs rather than removing them, but I don't know enough about how workflow works to be sure.

You can probably also do it with css.


... or use the module http://drupal.org/project/override_node_options ? Desccription:

The Override Node Options module allows permissions to be set to each field within the Authoring information and Publishing options field sets on the node form. It also allow selected field sets to be set as collapsed and / or collapsible.


For Drupal 7 you can use Jammer module.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号