dotCMS / core

Headless/Hybrid Content Management System for Enterprises
http://dotcms.com
Other
861 stars 468 forks source link

#getMostViewed macro not working with new datamodel #1255

Closed wezell closed 11 years ago

wezell commented 12 years ago

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

dotjorgeu commented 11 years ago

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

jtesser commented 11 years ago

For sure will not work on all Dbs.

jtesser commented 11 years ago

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

dotjorgeu commented 11 years ago

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

DeanGonzalez commented 11 years ago

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

samuelmortha commented 11 years ago

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