A very simple patch to provide an (too ?) easy way to configure how order selected nodes in a taxonomy_select_nodes call.

I think we could provide such way for each module that make a call to this functions.

Comments

nedjo’s picture

+1

I've long wished to get rid of the hard-coded sort order on nodes in taxonomies. This is similar to a patch I submitted nine months ago, see http://drupal.org/node/10839. There I tried to provide an interface for setting default sort orders. While this proposal doesn't do that, it opens the door--a bit plus. This is the sort of simple change that helps overcome lingering inflexibility of Drupal design, and that merits quick application.

tostinni’s picture

Well I remember seeing this patch, but when I posted this, I just forgot about it, sorry.
Btw, my aim was just a little diferent because I didn't wanted to hack too much the core, and I needed this feature to be used in taxonomy_menu (in fact my approach may be included at taxonomy level...) to provide a way to order taxonomies by vocabulary (I'd prefer to see this kind of setting made a little more in detail, I mean apply at term level (like my suggestion for ), but for the moment, it pretty fits my needs).
So I just release a little patch that update taxonomy_menu to use this order, but the main question stay arround there, why don't apply this to core and make a very flexible way to roder taxonomy ?
Let's dream, it would be included in 4.7 :D

darius’s picture

Looks like a nice and very minimal change to taxonomy.module that would finally add some flexibility in displaying nodes. Since this does not change any current functionality, it would be nice to see it committed to the core, so that contributed modules could take advantage of this change. I'm going to play around with this change, and maybe modify taxonomy_context to use this.

Darius

Steven’s picture

I have committed this patch to HEAD.

Anonymous’s picture

msz3544’s picture

Version: » 4.6.0

This patch seems to be exactly what I am looking for, and I even installed it to taxonomy.module and uploaded it, but I can't figure out where to configure it. I don't see any new menu's or options under any of the vocabularies, taxonomies, or in admin. Help? Thanks

tostinni’s picture

There's no configuration for this patch, because, it only allow others module to change the order of the node.

For example I made a special one for taxonomy_menu, see : Allow alphabetical order regarding Vocabulary, this one gives you a very simple menu, just to show the idea ;)

Feel free to contact me if you want more information.

bermin’s picture

Hey Tostinni,

could you give me a hint where I would make the necessary "taxonomy_render_nodes" changes if I want to make use of your patch to order flexinode posts within a category by title, asc assending?

tostinni’s picture

I think you should open an issue in flexinode, not to deviate the purpose of this thread which deals about taxonomy.

icarnales’s picture

It would be very good if you can add an "order by" option in the term configuration so we can have some terms ordered alphabetically and some chronologically.

hotgazpacho’s picture

StatusFileSize
new2.17 KB

Here's a patch that works against 4.6.3 (some DISTINCT()'s were added to the 4.6.3 taxo module, causing the original patch to fail).

thechraveler’s picture

I am uploading these patches to my modules directory, but they do not seem to be taking effect. Can someone please post instructions as to how to apply these patches for taxonomy ordering? Thanks...

chx’s picture

puregin’s picture

Version: 4.6.0 » x.y.z

Setting to Version CVS since this is a feature request issue.

tostinni’s picture

Hi puregin,
I think this feature is already present in CVS (Steven commited it at #4) and since, the status is closed.
So do you have some more features request ?