Hey Drupalistas!
First of all, thank you very much for the effort on this module! It works like a charm.
I noticed, coming from Nodequeue, that there is one (slightly important) function missing.
There is no sort function for "order by in queue or not". You can only do this as a filter.
But if I select the filter is will not show me all the other nodes ... I am forced to put everything in the entityqueue (this will be my workaround).
When using nodequeue I did this:
- sort on "in queue" (desc)
- sort on "position in queue" (asc)
This way I first get my nodes in the queue, ordere by position in the queue and then all the other.
P.S. I looked at the code but could not find a way to add a second sort option on line 57 of entityqueue.views.inc: "$data[$target_base_table]['entityqueue_relationship']['sort'] = array(" so if someone is willing me to help me on that one, I can maybe create it myself.
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | Screen Shot 2018-09-18 at 10.27.58 AM.png | 32.97 KB | andysipple |
| #9 | interdiff-9.txt | 2.17 KB | amateescu |
| #9 | 2753711-9.patch | 4.44 KB | amateescu |
| #7 | 0001-created-patch-for-2753711.patch | 4.49 KB | sagesolutions |
| #4 | 2753711-3.diff | 1013 bytes | tommychris |
Comments
Comment #2
tommychrisI created the modification, if anybody wants, please create a patch for it:
Create a new file \src\Plugin\views\sort\EntityInQueue.php
Modify \entityqueue.views.inc, add the following lines after the
block (from line 60 to line 75):
Comment #3
francescbassas+1
Comment #4
tommychrisAttached a .diff file.
Comment #5
dwwThanks for turning your contribution into a patch!
However, your patch is missing the new file src\Plugin\views\sort\EntityInQueue.php.
See https://www.drupal.org/node/707484 if you need help learning how to add new files in a patch.
You can set this to "Needs review" once you have a patch that includes everything.
Thanks again,
-Derek
Comment #6
japo32 commentedAny chance of a d7 version?
Comment #7
sagesolutions commentedSee attached patch from the provided code in the comments above
Comment #8
sagesolutions commentedComment #9
amateescu commentedMade a few corrections and committed to 8.x-1.x. Thanks everyone!
@japo32, let's open a separate issue for porting this patch to D7.
Comment #10
amateescu commentedComment #12
japo32 commentedThanks amateescu
https://www.drupal.org/project/entityqueue/issues/2995403
Comment #14
andysipple commentedThank you for the fix! Worked perfectly after updating!