Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-3.x-dev
Component:
statistics data
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
30 Nov 2009 at 08:48 UTC
Updated:
12 Aug 2010 at 13:34 UTC
When viewing a view 1 by 1 with ajax pager, or normal pager and display style as Node - Full, I would like to update the node count in the node statistics. I've noticed that only updates if I visit the node itself by it's path... not when I display it in this particular view which as an example is a full picture display of a photoblog.
So I would like to update the statistics on each page display in the views. Any way to do it? Thank you
Comments
Comment #1
dawehnerYes, have a look how the statistics module does it, and do this in preprocess or the view template for a single row.
Comment #2
merlinofchaos commentedRight, this isn't something Views itself is likely to provide at any point. It should only be a few lines of code to add externally. Perhaps it could make a decent very small module. Heck, maybe there already is one.
Comment #3
hedac commentedok.. I was confused with the node full display view in views, because it was displayed exactly as a full node view, except that the counters wasn't updated in each view. And I know it's not a standard node view. Of course Views is more generic and doesn't have to include a counter... but maybe in that case when it is full node view and 1 by 1... could be the case. Node - Teaser doesn't have to count as view.. but Node - Full would have to count.
I'm also thinking that it may be interesting also if using a View with fields if you want to control which fields to display as a full node when you don't have teasers..
Will look at that statistics module and look how to code a preprocess function... I still don't have a lot of experience in module programming but getting there day by day. Any help is appreciated too :)
In my case, maybe it is easier to use standard node views.. and include a Custom pager with "Custom pagers"
Comment #4
dawehnerYou could write the following in your theme. I don't tested the code, and there is a todo
Comment #5
dawehnerI think this is fixed now.
Comment #7
hedac commentedomg dereine sorry I missed your replies for some reason. Thank you very much !