Is there a way to sort the pages that show up in the tag block ?

Comments

rmiddle’s picture

??? The page is sorted but relevance. I might not understand what you want.

Thanks
Robert

darumaki’s picture

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.

rmiddle’s picture

If I understand you right. No the links inside the block do not take weight into account.

Thanks
Robert

Rob T’s picture

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 '.

rmiddle’s picture

That might break things. Need to look a little closers it to that.

Thanks
Robert

rmiddle’s picture

Status: Active » Closed (won't fix)

Going to mark this as wont fix since this isn't a standard use.

Thanks
Robert

dries arnolds’s picture

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.

rmiddle’s picture

Status: Postponed » Closed (won't fix)

Dupe

rmiddle’s picture

Title: Sorting option ? » sort the contents of the block by creation date, modified date, alphabetically and by importance
Status: Closed (won't fix) » Postponed

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

rmiddle’s picture

Status: Closed (won't fix) » Postponed

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.

rmiddle’s picture

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

rmiddle’s picture

Version: 6.x-1.9 » 6.x-1.18
Status: Postponed » Active

Need to put some time into this. Bumping it up.

tomsm’s picture

Hello, I would like to sort similar terms that have the same importance alphabetically. Will this feature be added?

Thanks!

rmiddle’s picture

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

rmiddle’s picture

Status: Active » Closed (won't fix)

6.x-1.x branch is no longer supported.

Thanks
Robert