Recipe Views Bulk Operations Content administration

Ingredients

Completed Recipe 7, Admin Role Views Bulk Operations module :

http://drupal.org/project/views_bulk_operations -[184 ]-

Views Bulk Operations (VBO) could just as well be called the "Better Site Administration" module. Let's start by looking at the content management page that comes with Drupal core at admin/content/node.

Content

Show only items-iwhere

0 status O type O category published

[iasy

Update options

[publish

Unpublish

Promote to front page Demote from front page Make sticky Remove stickiness Delete

Reload Embedded Media Data

[ Update

Type

Blog entry

Author Status Operations drupaltips published edit

Type

Blog entry

Author Status Operations drupaltips published edit

taxonomy_term

Blog entry

drupaltips

published

edit

Drupal issue bookmark

Blog entry

drupaltips

published

edit

Admin Links

Blog entry

drupaltips

published

edit

Function Reference for your site

Blog entry

drupaltips

published

edit

j Query bppkrfwktettó expand all fieldsets

Blog entry drupaltips: published edit:

j Query bppkrfwktettó expand all fieldsets

Blog entry drupaltips: published edit:

The form's user experience is a bit clunky, often requiring multiple clicks of the Filter button. In this recipe we provide an alternative to this form (in Recipe 51 we'll incorporate new actions into the options list).

1. Install and enable Views Bulk Operations.

2. Go to admin/build/views and notice the new default view (core default views were covered in Chapter 2).

Default Views

Default view Title Description Provides URL Status Actions

Default Views

Default view Title Description Provides URL Status Actions

VieWj edit and

admin_content

admin/content

. , Add

Content

delete your Page

Enabled

/node2

Disable

site's content.

3. Click on the Add link. Note that if you save this view without making any changes, you get a warning that the Node: Type must have a value!

Node: Type must have a value!

4. Before selecting the Node: Type filters, we will make an essential change to the default Views Bulk Operations view. Make sure that Views Bulk Operations are available only to the admin role (or other roles you wish to designate with key administrative privileges).

Access:

0 adnnin

EH anonymous user D authenticated user □ editor

5. Go to the Filters fieldset and select all available values for the Node: Type.

6. Save the view.

7. Check out your new content administration view at admin/content/node2. Upon loading the first time, the Operations form appears offering checkboxes of available actions.

Bulk operations for view admin_coritent

View Edit Clone Export Dev load Dev queries Dev items j

No operations are enabled, You must enable one or more operations in order to use Views Bulk Operations,

These settings determine which actions will be available from within a bulk operations view form. Operations selected here will be available for execution on the form. If only one action is selected; no dropdown will be provided and users will be able to perform or configure the single operation directly from the view form

Note: Install the Actions module to enable additional operations. 0 Delete (views_bu!k_operations_de!ete_nodes) 0 Demotefromfrontpagefnode_operations_demote) 0 Make sticky ('node_operations_sticky) 0 Promote to front page {node_operations_promote) 0 Publish {node_opera tions_pub!ish}

0 Reload Embedded Media Data (emfieid_operations_reload) 0 Remove stickiness (node_operations_unsticky) 0 Unpublish (node_operations_unpubfish)

[ Save configuration ]

8. Go ahead and select all the operations and save the configuration.

0 0

Post a comment