More in this section

Forums / Developing with Sitefinity / How do specify template for downloadlist

How do specify template for downloadlist

4 posts, 0 answered
  1. Mark
    Mark avatar
    7 posts
    Registered:
    16 Mar 2009
    04 Jun 2009
    Link to this post
    I'm trying to alter the default template for the downloadlist and I'm unable to change it.  How do I get the control to use the template I've specified?

    <sfWeb:DownloadList ID="downloadList" runat="server" Mode="ListMode" DisplayMode="ItemList" > 
           <ItemListTemplate> 
                Test 
            </ItemListTemplate> 
    </sfWeb:DownloadList> 

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    04 Jun 2009
    Link to this post
    Hello Mark,

    You can map the external template using layoutTemplatePath property and modify it. Another option is creating a custom control that inherits DownloadList control and overriding the same property.

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Mark
    Mark avatar
    7 posts
    Registered:
    16 Mar 2009
    04 Jun 2009
    Link to this post
    Thanks.  The ListModeTemplatePath property was what I needed.

    On a related note, I'm trying to update the filter of this control in an AJAX callback.  It's inside an updatepanel and I set the filter propertly, but it doesnt' update until the next postback occurs.  Is there a way to do this?

    I also tried using the LibraryManager and I'm able to get the library I need, but I've only been able to deduce that the library contains objects of CmsContentBase.  That class doesn't have a Title property however, which is what I need (aside from the download link).  My code looks something like this.

                LibraryManager manager = new LibraryManager("Libraries"); 
                ILibrary library = manager.GetLibrary("State Files"); 
                IList items = library.GetItems(); 
     
                foreach (CmsContentBase ccb in items) 
                { 
                    ... 
                } 

    Basically, I need to dynamically get a list of documents from a specific library based on the category.  I'd like to do this w/o a full page refresh.

    Appreciate any help you can give me.
    Mark
  4. Mark
    Mark avatar
    7 posts
    Registered:
    16 Mar 2009
    04 Jun 2009
    Link to this post
    Disregard, I figure it out.  I needed to get that information from the metadata.

    Thanks,
    Mark
Register for webinar
4 posts, 0 answered