sort the contents of the block by creation date, modified date, alphabetically and by importance
darumaki - August 13, 2008 - 02:32
| Project: | Similar By Terms |
| Version: | 6.x-1.18 |
| Component: | User interface |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
Is there a way to sort the pages that show up in the tag block ?

#1
??? The page is sorted but relevance. I might not understand what you want.
Thanks
Robert
#2
in the block where this module displays tagged pages, the links are not sorted and the normal weight option apples to the regular menus not this module, I was just curious if there might be a way.
#3
If I understand you right. No the links inside the block do not take weight into account.
Thanks
Robert
#4
I needed an alphabetical sort at the very least. For my purposes, time created wasn't the default sort I desired.
In similarterms.module ... I changed this (around line 181 and again, around line 196)
'ORDER BY ncount DESC, n.created DESC '.to this
'ORDER BY ncount DESC, n.title ASC, n.created DESC '.#5
That might break things. Need to look a little closers it to that.
Thanks
Robert
#6
Going to mark this as wont fix since this isn't a standard use.
Thanks
Robert
#7
Would it be a lot of trouble to add an option to the block config, to sort the contents of the block in a few ways?
I'm thinking creation date, modified date, alphabetically and by importance (and for all asc/desc).
It would sure help me and probably quite some other users as well.
#8
Dupe
#9
If you change the sort order in the query you change the results. Since we grab the 1st X results default is 5. The only way to change the sort options and still keep what you are getting is to sort the array after it is grabbed from the database. It is doable but add more processing power to an already pretty processor hungry process. If time permits I might look into ways to do this or if someone submits a patch I will include it.
Thanks
Robert
#10
Come to think about it there might to two ways to sort thing and both would have diff effect on your results. I need to think about this one for a while.
#11
Ok after a few min of thinking about it there are two ways to sort one is before the results are generates that will favor instead of the newest it would favor the sort type in the mod above it would favor items starting with a. The 2nd sort option is after it generates it results you sort those results that will return the same results but display then in different order. I think sorting by newest or oldest are the only sort options that should be used. Now sorting the results after they are returned that can make some since.
Thanks
Robert
#12
Need to put some time into this. Bumping it up.
#13
Hello, I would like to sort similar terms that have the same importance alphabetically. Will this feature be added?
Thanks!
#14
tomsm,
I have been busy so I haven't had a change to work on this. The issue is that it will require sorting the array after it is returned from the sql query. That will add processing cost to do so. However with the new caching stuff that will likely reduce that load some. When I have a change I will need to adding post processing sorting.
PS. It can be done by editing weblinks.tpl.php and sortting the array there.
Thanks
Robert