3

I'm trying to use an entity queue on a taxonomy to create a new sort order for an existing view. But I'm having trouble configuring it.

I've created a dummy website with a fantasy role-playing game theme. I have a content type "Monster" with a taxonomy term "difficulty".

enter image description here

Monsters can have several difficulty tags, but I've created an entityqueue for the subset of tags that I want to sort on:

enter image description here

Finally, I've created the view for monsters, with what I believe are the properly relationships to join in the entityqueue for sorting. Starting with the Monster content type, I've added a relationship to the Difficulty taxonomy term, then another relationship for the Monster Difficulty entityqueue. enter image description here

Finally, I added the entityqueue as the first sort criteria:

enter image description here

However, the results of the view are still sorting on the title field, "Name", meaning that the sort order of the entityqueue is either not making it in or being respected:

enter image description here

How do I sort a view based on a taxonomy entityqueue?

Edit I removed the sort for the title, as per hotwebmatter's suggestion, but that didn't cause it to sort by the entityqueue.

enter image description here

The order should go Big boss, boss, mini-boss, etc., but it doesn't.

enter image description here

Here are the configuration export ymls of those files different from a vanilla install: https://pastebin.com/r4A94QJ5

2
  • Did you remove “Content: Title (asc)” from the Sort Criteria? Did it work? Commented Nov 12, 2019 at 3:13
  • 1
    @hotwebmatter I tried that, it did not. See question edit.
    – user1359
    Commented Nov 12, 2019 at 15:42

1 Answer 1

0

I think that the Queue Position sort is being overridden by the Title sort. (In other words, the Title sort may be applied after the Taxonomy term Queue Position sort, making it appear as though the queue is not respected.)

If that's the case, then removing the Title field from the Sort criteria should be enough to get this working.

In case that's not sufficient, here's a good video tutorial on Entityqueue.

5
  • 1
    First time I hear of this module. Watching the video looks like it does the same as the weight module, which allows you to re-order your View's rows to your liking.
    – No Sssweat
    Commented Nov 12, 2019 at 1:57
  • Althought the advantage of this module is that it allows you to create various Queues while the weight module you're stuck with the same weight config.
    – No Sssweat
    Commented Nov 12, 2019 at 2:09
  • 1
    @NoSssweat Entityqueue is a rewrite of Nodequeue. These modules are great for giving clients the ability to reorder intent to their liking, without necessarily even having granting them a content editor role. (A user may be granted permission to reorder a queue of content without the ability to edit that content.) Commented Nov 12, 2019 at 2:27
  • 1
    There’s also another similar module called Draggable Views (drupal.org/project/draggableviews) but off the top of my head I’m not sure of the pros and cons of the four different modules. Commented Nov 12, 2019 at 3:02
  • 1
    metaltoad.com/blog/… Commented Nov 12, 2019 at 3:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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