Modifying Download List Widget

Posted by Community Admin on 03-Aug-2018 18:09

Modifying Download List Widget

All Replies

Posted by Community Admin on 30-Apr-2015 00:00

Is it possible to modify the download list widget to show the documents in a folder like structure instead of just all the published documents in the library in a list view?

 Thanks,

Hector Rodriguez

Posted by Community Admin on 01-May-2015 00:00

Hector,

 If you want to only show a filtered view of what is in a library, you can do so by using tags and categories to display the appropriate list of documents.

Posted by Community Admin on 06-May-2015 00:00

Bart,

 

The idea is to display the libraries like the picture attached. Where the library will show the folders and sub folders instead of just all the published documents in the parent library.

Posted by Community Admin on 11-May-2015 00:00

Hi,

I have created a sample control using the RadTreeView. It binds to the libraries and shows the folders and the images in them in a tree view. You can easily use it for documents or videos as well. I have attached the control in this reply. Here is a short video (screencast.com/.../cODRRo63N) of its functionality. The libraries manager is used to query the albums and then all folders of each album. Using the albums and folders all item are queried in them. You can find descriptive information about the control logic in this blog post in the second explained control.
You can also set the NodeTemplate of the items to the following, for instance:

Copy Code
<NodeTemplate>
  Title: <%# DataBinder.Eval(Container.DataItem, "Title") %> Extension: <%# DataBinder.Eval(Container.DataItem, "Extension") %> - Last Modified: <%# DataBinder.Eval(Container.DataItem, "LastModified") %> - Size: <%# DataBinder.Eval(Container.DataItem, "TotalSize") %>B
</NodeTemplate>


Regards,
Nikola Zagorchev
Telerik
 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

Posted by Community Admin on 19-May-2015 00:00

Hello Nikola,

 

That looks great! I am completely new to Sitefinity and I am not sure how i can apply the sample code you provided to my project? Any guidance would be greatly appreciated.

 

Thanks,

Hector Rodriguez

Posted by Community Admin on 20-May-2015 00:00

Hi Hector,

The user control can be easily registered using Thunder, or through the toolbox config, as shown here.

Regards,
Nikola Zagorchev
Telerik

 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

Posted by Community Admin on 20-May-2015 00:00

I was able to register it last night with the code you provided but when i apply the widget to a page all i see if the default library and nothing more even though there's other libraries and files in there, see image attached. Any idea why?

Posted by Community Admin on 20-May-2015 00:00

I see why it wasn't working now. The code only applies to the libraries and pictures in the images module. Is there a way to make it show the Documents and Files module? Also does LisTreeView allow for download of the document? I tested the Image library and it doesn't seem to let me download the image. Sorry for all the questions just new to Sitefinity and don't have much background in coding. The idea would be to have something like the TreeView in the link below but with the files accessible for download. Is this possible?

demos.telerik.com/.../defaultcs.aspx​

Thanks!

 

Hector Rodriguez

Posted by Community Admin on 20-May-2015 00:00

Hello Hector,

It is possible, you should get the document and files folders instead of the albums, in the beginning of the widget code. You should use the GetDocumentLibraries method. You can find more information here:
http://docs.sitefinity.com/for-developers-query-documents#querying-documents-by-a-document-library
In order to be able to download the documents, you should make a link pointing to the document MediaUrl. It will navigate you to download the document directly, as in the download list widget, for instance.

Hope this helps.

Regards,
Nikola Zagorchev
Telerik

 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

Posted by Community Admin on 20-May-2015 00:00

Nikola,

Thanks for your reply. I was able to  get it to show the Documents&Files libraries but I cannot get it to show the documents inside the libraries. Would it be possible for you to send me sample code like the previous one you supplied me with and also add in the document media url to be able to download the documents.

 

Also, another question. Will this method be able to show certain libraries based on who is logged in? for example if a user doesn't have access to a specific library it wont show it in the treeview structure.

 

Thanks,

Hector Rodriguez

Posted by Community Admin on 22-May-2015 00:00

Hi Hector,

I have provided a sample in the separate thread you have opened here:
http://www.sitefinity.com/developer-network/forums/general-discussions-/applying-treeview-to-documents-files

Regards,
Nikola Zagorchev
Telerik

 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

This thread is closed