core icon indicating copy to clipboard operation
core copied to clipboard

#getMostViewed macro not working with new datamodel

Open wezell opened this issue 14 years ago • 6 comments

We need the #getMostViewed macro to work with the new datamodel, i.e. contentletversioninfo

wezell avatar Sep 27 '12 22:09 wezell

I see in the query this: contentlet_version_info.deleted=0 that isn't going to work on all dbs I think

dotjorgeu avatar Nov 16 '12 18:11 dotjorgeu

For sure will not work on all Dbs.

jtesser avatar Nov 16 '12 18:11 jtesser

Sam fix this with a prepared statement passing in addParam(false)

jtesser avatar Nov 16 '12 18:11 jtesser

also, I don't think joining with clickstream is a good idea anyway. We have tasks that periodically remove data from that table. So, the current status should be between clickstream (data not processed by dashboard) and analyzed data.

And we need proper joins here. AND we don't need to join with inode table

dotjorgeu avatar Nov 16 '12 18:11 dotjorgeu

Ah ok.. I was going to comment on this guy but I see you guys already have it re-opened... Here is the screencast I made... http://screencast.com/t/F3zkFbLkeT ..I do see the identifiers in the clickstream table... just could not get macro to do anything... I guess we'll try again on this one

DeanGonzalez avatar Nov 16 '12 18:11 DeanGonzalez

Updated the getMostViewed() macro.

Syntax :

#getMostViewed("News")

Arguments :

$structureVariableName

Variable name of a structure with URL Map - SEO Friendly URLs.

By default will fetch the most viewed content identifiers from last 3 months for the specified structure.

Optional parameters.

$mostViewedStartDate : Start date of the interval as a String

$mostViewedEndDate : End date of the interval as a string

$mostViewedLimit : integer

Test screencast : http://screencast.com/t/huoCtXhsOq

samuelmortha avatar Mar 11 '13 19:03 samuelmortha