Entityqueue
entityqueue
Allows users to create manually ordered lists (queues) of any entity type with drag-and-drop reordering and deep Views integration.
Overview
The Entityqueue module provides a powerful system for creating arbitrarily ordered lists of entities. Site builders can create queues that hold any type of Drupal entity - content nodes, users, taxonomy terms, media items, or any other entity type. Each queue is implemented using entity references, and items within queues can be manually reordered using a drag-and-drop interface.
The module introduces two custom entity types: Entity Queue (configuration entity defining the queue structure) and Entity Subqueue (content entity holding the actual queued items). This architecture supports both simple single-list queues and complex multi-subqueue scenarios.
Entityqueue offers extensive Views integration, providing relationship handlers, filters, and sort criteria that allow displaying queued content in the exact order defined by editors. The module also integrates with the contextual links system and supports off-canvas editing when the Settings Tray module is enabled.
The plugin-based queue handler system allows for extensibility, with built-in support for Simple queues (one fixed subqueue), Multiple subqueues (user-created subqueues), and Smart queues (automated subqueues based on entity references, provided by the included submodule). The module also supports Workspaces for content staging workflows.
Install
composer require 'drupal/entityqueue:8.x-1.10'
composer require 'drupal/entityqueue:8.x-1.7'
Features
- Create ordered queues for any entity type (nodes, users, taxonomy terms, media, etc.)
- Drag-and-drop interface for reordering queue items with AJAX support
- Configurable minimum and maximum queue sizes with optional automatic truncation
- Supports multiple queue handlers: Simple queue (single fixed subqueue), Multiple subqueues (unlimited user-created subqueues), and Smart queue (automated subqueues)
- Deep Views integration with relationship, filter, sort, and field handlers for displaying queued content
- Contextual links for quick editing of queue items directly from Views displays
- Revisionable and translatable subqueues with full content moderation support
- Integration with Rules module for automated queue manipulation
- Integration with ECA module for event-driven queue conditions
- Drupal Core Actions integration for bulk operations (add/remove items from queues)
- Per-queue granular permissions for queue manipulation
- Entity tab integration showing available queues for each content item
- Migration support from Drupal 7 Entityqueue module
- Workspaces support for content staging workflows
- Off-canvas editing support via Settings Tray module integration
Use Cases
Featured Content Slider
Create a simple queue for nodes, then create a View with an Entityqueue relationship limited to that queue. Add a Queue Position sort and display as a slideshow. Editors can drag and drop content to change the featured items order.
Category-Based Featured Articles
Use the Smartqueue submodule to create queues based on taxonomy terms. Each category term automatically gets its own subqueue, allowing editors to feature specific articles within each category.
Editorial Picks by Section
Create a queue with multiple subqueues support. Create separate subqueues for Homepage, Sports, Politics, etc. Use Views with subqueue filters to display the appropriate content in each site section.
Automated Content Rotation
Combine with Rules or ECA to automatically add new content to queues based on criteria, and use the shuffle action in a cron job to randomize featured content daily.
Event Schedule Management
Create a queue with 'Act as queue' enabled and a maximum size. As new events are added, older events are automatically removed from the featured list, maintaining a fixed-size upcoming events display.
User-Specific Reading Lists
Create a multiple subqueues queue for nodes. Programmatically create a subqueue per user for personalized reading lists or bookmarks.
Tips
- Always add a Queue Position sort when displaying queued content in Views, otherwise items will appear in default order.
- Use the 'Act as queue' setting with a maximum size to automatically maintain a fixed-length queue without manual cleanup.
- For large queues, consider using the Views selection handler to provide filtered entity autocomplete.
- The contextual links feature requires the core Contextual Links module and 'Access contextual links' permission.
- When using Workspaces, queue changes are staged and only published when the workspace is deployed.
- Simple queues are fastest to set up for basic featured content needs; use multiple subqueues only when you need categorization.
- The dragtable widget shows restricted access message for entities the current user cannot view, but the queue still functions correctly.
Related Projects
Provides relationship, filter, sort, and field handlers for displaying queued content. Add an Entityqueue relationship to connect content to queues, use position sort to display in queue order, and filter to show only queued items.
Provides actions for automated queue manipulation: add/remove entities, clear queue, shuffle items, and reverse order. Enables event-driven content curation workflows.
Provides the 'Entity is in Subqueue' condition for building automated workflows based on queue membership.
Subqueues are fully translatable. Queue items can be managed separately for each language, with translation overview available for each subqueue.
Full Workspaces support for staging queue changes. Views queries are automatically modified to show the correct revision of queued content based on the active workspace.
Edit subqueue links in contextual menus open in an off-canvas dialog, enabling quick editing without leaving the page.
The subqueue entity form can be customized through the Field UI at the queue edit form, allowing additional fields to be added to subqueues.
Compatible with Entity Browser widgets for the items field, enabling modal entity selection interfaces.
Compatible with Inline Entity Form widgets, allowing entities to be created or edited inline while managing queue items.
Includes migration plugins for upgrading from Drupal 7 Entityqueue module, handling both queue configurations and subqueue content.
Admin Pages
| Title | Path | Description |
|---|---|---|
| Entityqueues | /admin/structure/entityqueue |
Main administration page listing all entity queues. Queues are organized into enabled and disabled sections. Each queue displays its name, target entity type, queue type (handler), and item count. Operations include Configure, Edit items (for simple queues), Enable/Disable, and Delete. |
| Add Entity Queue | /admin/structure/entityqueue/add |
Form for creating a new entity queue. Configure the queue name, type, target entity settings, and queue behavior options. |
| Configure Entity Queue | /admin/structure/entityqueue/{entity_queue} |
Edit the configuration of an existing entity queue. Most settings can be modified except the machine name and target entity type which are fixed after creation. |
| Edit subqueue | /admin/structure/entityqueue/{entity_queue}/{entity_subqueue} |
Edit the items in a subqueue. Provides a drag-and-drop interface for reordering items, an autocomplete field for adding new items, and buttons for bulk operations (Reverse, Shuffle, Clear). Each item shows a Remove button and optionally an Edit link. |
| Subqueues | /admin/structure/entityqueue/{entity_queue}/list |
Lists all subqueues belonging to a queue with multiple subqueue support. Shows subqueue title and operations (Edit, Delete). |
Permissions
| Permission | Description |
|---|---|
|
Administer entityqueue configuration and create, update and delete all queues. This is a restricted permission. |
|
Access the entityqueues list at /admin/structure/entityqueue. |
|
Access to update all queues regardless of per-queue permissions. |
|
Access to create new subqueues for the specified queue. Only available for queues with multiple subqueue support. |
|
Access to update items in the specified queue. |
|
Access to delete the specified queue or its subqueues. |
Hooks
| Hook | Description |
|---|---|
hook_entity_field_access |
Controls access to the subqueue title field. Prevents editing the title for queues with automated subqueues (Simple and Smart queue handlers). |
hook_views_pre_render |
Adds contextual links to Views that use entityqueue relationships, enabling quick access to edit subqueue items directly from the View. |
hook_contextual_links_view_alter |
Modifies entityqueue contextual links to use off-canvas dialogs when Settings Tray module is enabled. |
hook_entity_delete |
Automatically removes deleted entities from all subqueues that reference them. |
hook_views_query_alter |
Modifies Views queries to properly handle entityqueue relationships within Workspaces. |
hook_views_data_alter |
Adds entityqueue-specific Views handlers (relationship, filter, sort, field) to all entity types that have queues defined. |
Troubleshooting
Ensure you have added both an Entityqueue relationship AND a Queue Position sort to your View. The sort must use the entityqueue relationship.
Check that the queue's entity settings have the correct target type and bundles configured. Also verify the user has permission to view the entities.
The queue has minimum or maximum size constraints. Add more items to meet the minimum, or enable 'Act as queue' to automatically remove excess items.
Enable the Contextual Links module, grant 'Access contextual links' permission, and ensure 'Show admin links' is enabled in the View display settings.
Check if 'Act as queue' is enabled with a maximum size. This automatically removes items when the limit is exceeded. Also check if the referenced entities were deleted.
Security Notes
- The 'Administer entityqueue' permission is restricted and grants full control over all queues - assign carefully.
- Per-queue permissions allow granular access control for content editors without full administrative access.
- Queue manipulation permissions do not grant access to the underlying entities - users still need view/edit access to the queued content.