How can we increase the number of nodes that are displayed in the stream?
I've been looking for the code in the activitystream.module file, but I can't seem to find a way to do it.
How can we increase the number of nodes that are displayed in the stream?
I've been looking for the code in the activitystream.module file, but I can't seem to find a way to do it.
Comments
Comment #1
eojthebraveCurrently the module uses the global number of posts, set under Drupal's post settings, when determining how many items to display. This however is limited to 30 items max.
If you want more than that you'll have to edit it manually.
Open activitystream.module and go to line 231. Should be something like
change that to
That should take care of it.
I also submitted a patch previously that allows you to configure this to be whatever number you want in admin/settings/activitystream (#287984: Configurable number of items on stream page) But akalsey opted to use the global Drupal setting instead. The patch probably doesn't apply to the current version any longer, but should get you going in the right direction if you want to do it that way instead.
Comment #2
dmetzcher commentedThanks. I knew it had something to do with that line, but I wasn't sure how to change it. Works great!
Comment #3
akalsey commentedIn general, I'm going to resist adding settings and switches. There's almost ALWAYS a best way to do something, and providing a configurable setting is often used as a cop-out to keep the developer from having to actually think. There's always going to be someone, usually a power user, who wants things different, and so Activity Stream is designed to allow power users to write things on their own, while still keeping things simple for everyone else.
In keeping with this philosophy, there won't be a setting for the number of items shown in the stream. Instead, the global setting will be used by default. For power users who want to change this, the supported method will be to build a View and configure it however you want. There's a patch ( #266615: Add views support ) that adds views support to 5.x. The only thing that's keeping that from being added into the official release is testing. If you want to get this in sooner, testing would help a lot. Apply the patch, use it, and give your feedback in the comments.