+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Modifying Download List Widget

Modifying Download List Widget

11 posts, 0 answered
  1. Hector
    Hector avatar
    32 posts
    Registered:
    01 Oct 2013
    30 Apr 2015
    Link to this post

    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

  2. Bart Welch
    Bart Welch avatar
    64 posts
    Registered:
    10 Jul 2009
    01 May 2015 in reply to Hector
    Link to this post

    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.

  3. Hector
    Hector avatar
    32 posts
    Registered:
    01 Oct 2013
    06 May 2015 in reply to Bart Welch
    Link to this post

    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.

  4. Nikola Zagorchev
    Nikola Zagorchev avatar
    424 posts
    Registered:
    08 Dec 2016
    11 May 2015
    Link to this post
    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 (http://screencast.com/t/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
     
  5. Hector
    Hector avatar
    32 posts
    Registered:
    01 Oct 2013
    19 May 2015 in reply to Nikola Zagorchev
    Link to this post

    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

  6. Nikola Zagorchev
    Nikola Zagorchev avatar
    424 posts
    Registered:
    08 Dec 2016
    20 May 2015
    Link to this post
    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
     
  7. Hector
    Hector avatar
    32 posts
    Registered:
    01 Oct 2013
    20 May 2015 in reply to Nikola Zagorchev
    Link to this post
    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?
  8. Hector
    Hector avatar
    32 posts
    Registered:
    01 Oct 2013
    20 May 2015 in reply to Nikola Zagorchev
    Link to this post

    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?

    http://demos.telerik.com/aspnet-ajax/treeview/examples/applicationscenarios/directorystructure/defaultcs.aspx​

    Thanks!

     

    Hector Rodriguez

  9. Nikola Zagorchev
    Nikola Zagorchev avatar
    424 posts
    Registered:
    08 Dec 2016
    20 May 2015
    Link to this post
    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
     
  10. Hector
    Hector avatar
    32 posts
    Registered:
    01 Oct 2013
    20 May 2015 in reply to Nikola Zagorchev
    Link to this post

    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

  11. Nikola Zagorchev
    Nikola Zagorchev avatar
    424 posts
    Registered:
    08 Dec 2016
    22 May 2015
    Link to this post
    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
     
11 posts, 0 answered