I'm working on a Drupal implementation which would need a different node sorting that the default 'order by n.created'. After looking, in vain, for any approach to this feature in the forums, I came up with a very simple module which does the job. The only 'problem' is that this would need to apply some patches to other core modules.
Now my question goes to core developers: do you think this approach to this functionality could be applied to the actual wortks on 4.7? If you look at the attached files we would only need to agree on the names of the variables to use into the core modules, and only into the ones that load and show any type of nodes.
I'm aware of the rushing to have a release candidate, however, I think this is a nice functionality to have with the new 4.7. If you agree with me, please, let me know and I will adapt this to the new form api and will work on the patches.
In any case, I will use this module for my project and would like to release it for 4.6 also. Any suggestions on this sorting.module would be appreciated.
The zip file includes a new sorting.module and a couple of patches for node.module and taxonomy.module. These files allow to choose three different types of ordering on promoted nodes and taxonomy lists: ordering by created, title and changed values.
As I said, any feedback would be very much appreciated.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | sorting.patch | 2.5 KB | robertgarrigos |
| #6 | sorting.module | 1.59 KB | robertgarrigos |
| #5 | taxonomy.module_11.patch | 1.71 KB | robertgarrigos |
| #4 | node.module_17.patch | 806 bytes | robertgarrigos |
| sorting.zip | 2.36 KB | robertgarrigos |
Comments
Comment #1
kbahey commentedRobert
You may want to look at the Extended Tracker http://drupal.org/node/36756 here.
It may do some of what you want.
Comment #2
nedjoA relevant issue posted a bit over a year ago:
http://drupal.org/node/10839
I still think some sort of sorting options within taxonomies belongs in core.
Comment #3
drummPlease post one patach file for everything.
cvs diff -uF^f file1 file2 ...The additional file can be posted in a separate followup.
Comment #4
robertgarrigos commentedthanks drumm. I'll do that.
Comment #5
robertgarrigos commentedComment #6
robertgarrigos commentedthis is the last: the module itself.
Comment #7
robertgarrigos commentedsorry drumm, I just realize I missunderstood you.
use either this sorting.patch or the node and taxonomy patches attached to previous posts.
I have already posted the module itself with a previous post.
Comment #8
robertgarrigos commentednedjo, we both did almost the same. my patch is even less 'agressive' with the core code, but you are right, there is no other way of sorting alphabetically than patching the core. I'm amazed that this functionallity hasn't been made available yet.
Comment #9
tostinni commentedIf you look correctly at the thread mentionned by nedjo, I just told that such a patch had been commited to HEAD, so wait a little for 4.7 it will give you the tools to do what you need.
Then after 4.7 rolls out, I would advice you to post your module without patching the core ;)
Comment #10
robertgarrigos commentedsorry, I provably read that post too quickly. thanks.
Comment #11
irishsuperfly commentedI just wanted to say THANK YOU!!! This worked perfectly for my site and saved me from many headaches.
Comment #12
magico commentedComment #13
robertgarrigos commented