All that needs to be added in function jcarousel_views_add is, $view->total_rows = $count; under the count query result. This would allow that quantity to be used and themed. Thanks!

CommentFileSizeAuthor
#3 jcarousel_view_count.patch665 bytesquicksketch

Comments

rickmanelius’s picture

Subscribe

quicksketch’s picture

This sounds like a good idea but we should probably put this count somewhere that is more appropriate. We shouldn't just shove the value in $view->total_rows, because it's not at all clear that this value would be coming from jCarousel module. We need to put it somewhere within the jcarousel settings within the View.

I don't have any immediate need for this functionality, so a patch would be appreciated to get this moving.

quicksketch’s picture

Status: Active » Fixed
StatusFileSize
new665 bytes

We shouldn't just shove the value in $view->total_rows, because it's not at all clear that this value would be coming from jCarousel module. We need to put it somewhere within the jcarousel settings within the View.

Well upon further thought, it looks like Views module already puts the total in $view->total_rows if you set $view->get_total_rows = TRUE. So there's already a way to get this count, but you probably don't want Views to be doing the count query twice. So ultimately I think we'll actually take your suggestion directly and put the count in $view->total_rows, since that's where Views would put the count if you'd asked it to be generated.

I've committed this patch to both 2.x branches.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.