I'm building a custom module so the editors at my company can select several nodes and spit them out as a newsletter. There are some modules that get me halfway, but due to some specific requirements, coupled with me really wanting to wrap my head around creating custom modules, I'm starting from scratch.

I understand the hooks, and have set up the menu, permissions, and most of the form fields where users can select a template and other options. I'm stuck at the part where they actually pick the nodes.

I was thinking I can probably create a View with some exposed filters and maybe hook into that, if it's possible. Ideally, I'd let them drag and drop the nodes, reorder them, etc.

I'm not looking for someone to code this out for me, would just like to be pointed in the right direction.

  • I'm thinking maybe I just need to use Views Bulk Operations. There's an option to pass the IDs as a comma-separated list to another page. There's even a Draggable Views plugin. As much as I want to, there's probably no point to reinventing the wheel here.
    – Mike
    Jan 25, 2014 at 21:56
  • The drupal.org/project/nodequeue module seems to do what you want, and if it doesn't I am sure it would have lots of reusable code that would help you along the way.
    – Jimajamma
    Jan 25, 2014 at 22:08

1 Answer 1


Without knowing the full scope or what modules/custom code you've already developed, this could be done fairly easily with a hook_menu, custom form and a content type. The new content type would have a multi-select (probably auto complete) node reference field which will allow for simple reordering. You could then implement a hook_menu with a custom form returning all the newsletters in a select list and when the form is submitted you can use node_load() to get all the referenced nodes from the selected node. Your submit handler would pass the applicable values to whatever batch mail module/functions you're using.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.