Hi,
I forgot that I opened this post. Sorry for my low responsibility of this post. I decided to roll my own solution by pure mgix tv and write a snippet to get file.
I'll share with you if you need the same features for your project:
fileList TV:
Form tabs:
[
{"caption":"File info", "fields": [
{"field":"name","caption":"Title"},
{"field":"description", "caption":"Description", "inputTV":"richtextTV"},
{"field":"filepath", "caption":"Path", "inputTV":"fileTV"},
{"field":"dcount", "caption":"Download Count", "inputTV":"downloadcount"}
]}
]
Grid Columns:
[
{"header": "Name", "width": "160", "sortable": "true", "dataIndex": "name"},
{"header": "Path", "width": "50", "sortable": "false", "dataIndex": "filepath"},
{"header": "Download Count", "width":"50","sortable":"true","dataIndex":"dcount"}
]
Remember create some relevant TVs: richtextTV (richtext type TV), fileTV (file type TV), downloadcount(number type TV)
getFileTV
http://www.tipiweb.tk/getFileTV.txt
file.item.tpl chunk:
<li><a href="[[~ID of your resource which contains getFileTV]]&res_id=[[*id]]&item_id=[[+MIGX_id]]" target="_blank"><i class="icon-file dim"></i> [[+name]] ([[+dcount]] downloads)</a></li>
getFile resource
Content: [[!getFileTV]]
In your Template list the files by using getImageList:
[[*fileList:notempty=`<h4>Attachment Files</h4><ul class="file-list">[[!getImageList? &tvname=`fileList`&tpl=`file.item.tpl`]]</ul>`]]
Then it's all set. When creating a resource, you should see the TV for adding attachment files to your resource.
On frontend, you have the list of attachment, click the link will redirect you to the download page and trigger the download.
Good luck.
[ed. note: nepheus last edited this post 11 years, 4 months ago.]