Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By hmdnawaz on
I have a block which is listing some data from 3 custom database tables. this block is not from views, its a custom block with code.
I want to add bulk operations functionality to this block for sending emails etc.
Is it possible to add bulk operations to custom blocks?
Comments
You may have to expose these
You may have to expose these custom tables to Views by implementing your own hook_views_data so that you'd be able to convert this block into one. Once that's done you'd have to implement your own action (https://www.drupal.org/node/2052067) to do whatever you need for these tables and add that to your View (described here: https://www.drupalgardens.com/documentation/applying-bulk-actions-view-i...)
Without views
I want it without views. Is it possible?
Ahmad Nawaz
Acquia Certified Developer
Email: hmdnawaz@gmail.com
Skype: hmdnawaz
Since you are creating the
Since you are creating the block, you can add what ever you like. But since you are not using views, you will need to handle this completely within your code.