Jump to content

Link to download count of a file in IP Content


TravelingPasserby

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...