TravelingPasserby Posted October 29, 2018 Posted October 29, 2018 Hi, Is there a way I can hook into a files download count inside of a IP Content / Pages template. Maybe by ID or something? I looked at how the download count is pulled in the actual Downloads application but I am not sure how to reference it from a IP Content / Pages template or template field. Does anyone know how, or can someone show me some example code? I am wanting to show the download counter directly in the template, not link to the download page.
bfarber Posted October 29, 2018 Posted October 29, 2018 So in a Pages template you are pulling a file from Downloads and want to show the number of downloads that file has had? If you are working with the row from downloads_files as an array, you would reference $row['file_downloads']. If you are working an \IPS\downloads\File object you would need to reference $file->downloads.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.