21489 Posts in 5783 Topics by 2622 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 426 Views |
-
Create a download list automatically

28 September 2011 at 6:05am
I want to create a list or table of downloads with a title, description, icon and of course the download link.
I don't want to create a list within the editor, because it gets messed up quickly and I want it update automatically rather than edit the list manually.
Is there any plug-in or a best-practice? -
Re: Create a download list automatically

28 September 2011 at 3:57pm
You could create some DataObjects and code a basic editor to use in the CMS, then for the front-end create some new .ss templates along with a page controller to handle the URL routing and resource requests.
Here are some tutorials:
http://www.ssbits.com/tutorials/2010/dataobjects-as-pages-part-1-keeping-it-simple/
http://www.ssbits.com/tutorials/2010/dataobjects-as-pages-part-2-using-model-admin-and-url-segments-to-create-a-product-catalogue/ -
Re: Create a download list automatically

29 September 2011 at 2:23am Last edited: 29 September 2011 2:24am
Hi,
I think this post can be of good use to you:
http://www.silverstripe.org/data-model-questions/show/12951It explains how to get a list of files from a folder.
If you need a long description and a custom file icon pr. file, then i guees you need to go with the Dataobject approach.
--
Thomas B. Nielsen
http://www.nobrainer.dk/ -
Re: Create a download list automatically

29 September 2011 at 8:18am
Filename, icon and link should be pretty easy and even handled pretty simply since you just need to access files whose parent is a certain folder. I've use similar methods to automatically pair images with product data during a csv bulk upload. The description is a little more tricky as that data isn't stored in the file and would need its own dataobject. I've also then used a tableListField with a checkbox to allow users to select multiple files and download as a single zip
-
Re: Create a download list automatically

29 September 2011 at 9:52am
Thanks all for your help. I think the links are a pretty good starting point for me.
I could skip the description but actually I want to know how I can get them in there
I'll get my hands on it the next days.
Thanks a lot!
| 426 Views | ||
|
Page:
1
|
Go to Top |



