Would it be possible to sort the digests by content type? That is, generate the digest so that all the content of a particular type is grouped together?

Comments

salvis’s picture

There's currently no option to do that, but it could be implemented. Right now, it's strictly in time order, which is the one order that pretty much everyone can immediately relate to...

How would by-content-type be an improvement?

somebodysysop’s picture

A user made the request. They have 3 content types: Feeds, Stories and Events. It would be more readable and useful (according to him) if the digests were sorted by the content types so that the user could focus on the most important section(s) first. Of course, they're getting lots of these daily, so that's why I think it sort of makes sense.

If I were to attempt some sort of patch, where would you recommend that I look first?

salvis’s picture

Sorry for the long delay...

In subscriptions_mail_cron() look for

    foreach ($mails as $uid => $user_mails)

$user_mails is an array of the notifications for this one $uid. Sort them as you like.

However, I'm afraid you don't have the content type that you want to sort by. So look above, where the $mails array is filled, and add the content type to each mail.

salvis’s picture

It might make sense to implement a hook here, so that a custom module could provide sorting. Care to submit a patch?

somebodysysop’s picture

Thanks for the follow-up. I'll take a look.

peterx’s picture

Perhaps an option to use a view so we can modify the view without touching the code in the module.

salvis’s picture

Version: 6.x-1.0-beta5 » 7.x-1.x-dev

We'd need a patch for D7 first, then someone could backport.

salvis’s picture

We'd need a patch for D7 first, then someone could backport.

salvis’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)