Upgrade Your Drupal Skills

We trained 1,000+ Drupal Developers over the last decade.

See Advanced Courses NAH, I know Enough

4 Patches to Get Entityqueue on Drupal 8 Behave as it Should Be (as of November 10, 2016)

Parent Feed: 

TLDR;

  1. Add "Reverse order in admin view" option: https://www.drupal.org/node/2478685
  2. Fix a problem that causes the queue to be always required when using "Limit to a specific entity queue": https://www.drupal.org/node/2821631
  3. Add a tab for Entityqueue on content types: https://www.drupal.org/node/2145441
  4. Make "Contextual links" work for views using Entityqueue: https://www.drupal.org/node/2825773

When using the Entityqueue module in Drupal 8 as a tool for editors and site admins to order content, you will end up working on the following use cases:

  • Use case 1: Use Entityqueue as a filter: shows only the items chosen in the queue.
  • Use case 2: Use Entityqueue as a loose sorting tool: does NOT limit the items based on queue, but prioritizes the items chosen in the queue to be displayed first, then shows the rest, perhaps in a reverse chronological order.

These are the most common use cases we use at Vardot for our clients when we build a site.

Use case 1 works perfectly if you use Entityqueue as is.

However, use case 2 does not work properly. Therefore, we have contributed (or contributed to), two patches that would make life easier to build a solid experience using the Entityqueue module in Drupal 8.

Added to that, we also patched two missing features that existed in Nodequeue, and should now exist in Entityqueue for Drupal 8.

Note: this post was written in November 10, 2016, which until this date, these patches are not yet committed to Entityqueue. Please review the patches, we hope that they get committed and become part of the next Entityqueue release.

1. Queue is always required when using "Limit to a specific entity queue"

Issue link: https://www.drupal.org/node/2821631

Needed for use case 2, you will most likely need your view to limit results to only items in the entity queue your joining in.

 

2. Get the good old "Reverse order in admin view" option

Issue link: https://www.drupal.org/node/2478685

For use case 2, this option will come in handy, since you will be sorting in reverse chronological order after the items in the queue are shown first.
Therefore, this nice workaround allows you check "Reverse order in admin view" to ensure the items in queue appear first in view when you sort.

 

3. Get the good old Nodequeue tab to appear along with content tabs

Issue link: https://www.drupal.org/node/2145441

If I'm an editor or a site admin, it wouldn't make sense to me to see the queues that I can add a piece of content to.

This tab has been missed from Entityqueue, now it comes back.

4. Get Contextual Links to send you directly to the queue edit page

Issue link: https://www.drupal.org/node/2825773

Plans for this is to integrate with the new outside-in approach of Drupal 8.2 using the Settings Tray module.

This patch provides you as an editor or site admin, to go directly to the queue from the front end using the contextual links, instead of searching for the queue by its name from the admin view.

Let's hope these patches get committed and pushed to Entityqueue module.

This tab has been missed from Entityqueue, now it comes back.

Original Post: 

About Drupal Sun

Drupal Sun is an Evolving Web project. It allows you to:

  • Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
  • Facet based on tags, author, or feed
  • Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
  • View the entire article text inline, or in the context of the site where it was created

See the blog post at Evolving Web

Evolving Web