By grubesteak on
Good heavens. I have this huge project due for work today and I thought all of this was working. Apparently I was wrong.
Here's the site: http://www.lawrenceplanning.org/submittals/
Click on a quadrant and it takes you to something like this: http://www.lawrenceplanning.org/submittals/taxonomy/term/9
I need these to show up alphabetically, not as date entered.
I have Googled and Yahooed and searched the Drupal forums. I see plenty of references to it, but I can't get it to work.
Please, please help me.
Thanks.
Eric Gruber
p.s. I'm using Drupal 4.6
Comments
Two methods
Here are two choices I would evaluate.
1. the Quick & Dirty method if you are in a rush. Find the SQL statement thats pulls nodes from the database and swith the ORDER BY section to TITLE from DATE. This will most likely move every page on your entire site to sort Alphabetically. Not recommended.
2. Look at the Views Module which I believe can do what you are asking. This is a MUCH better long term solution, but will probably require some fiddling to get it working. http://drupal.org/project/views
Good luck !
Thanks ...
... I'm trying it now. I'll let you know what happens.
Ugh
Doesn't work. I hate drupal.
1)
What is the 'it' that doesn't work?
Quick & dirty.
Open modules/taxonomy.module, locate taxonomy_select_nodes and change the query on line 849 to
ORDER BY n.title ASC instead of ORDER BY n.sticky DESC, n.created DESC
Then pray it 1) works and 2) doesn't break anything else.
--
The Manual | Troubleshooting FAQ | Tips for posting | Make Backups! | Consider creating a Test site.
Solved: Thank you.
Thank you, thank you, thank you!!!!
Oh, headache now leaving ...
I don't really hate Drupal. I just get a little frustrated sometimes. Well, I don't like 4.7, but that's a matter of personal preference.
Thank so much. Oh, I'm so happy.
Taxonomy in alphabetical order, version 4.7
Thank you indeed, this answer should be promoted in some kind of taxonomy "how to"!
In 4.7, the line to be modified is 1094.
Here's how it looks (given that you still want to preserve the stickyness of some posts):
function taxonomy_select_nodes($tids = array(), $operator = 'or', $depth = 0, $pager = TRUE, $order = 'n.sticky DESC, n.title ASC') {I've tried it, works fine.
And if you are using the Category Module . . .
When using the cateogry module, I found that making the changes to the taxonomy.module wasn't enough. You have to change the category.inc file.
Line 889 in the 5.1 version:
function category_select_nodes($cids = array(), $operator = 'or', $depth = 0, $pager = TRUE, $distant = FALSE, $order = 'n.sticky DESC, n.created DESC')Change it to
function category_select_nodes($cids = array(), $operator = 'or', $depth = 0, $pager = TRUE, $distant = FALSE, $order = 'n.sticky DESC, n.tite ASC')Thanks folks!
This worked perfectly, however the line to change for Taxonomy in 6.1 is 1074
views does this
out of the box
Yes, don't do this
Among probably other unintended consequences, it changes the order of the items in your RSS feeds. Just realized this today. Better to use views to get the same result without effecting any core modules.