Get Library Name into the Download List Template

Posted by Community Admin on 05-Aug-2018 19:03

Get Library Name into the Download List Template

All Replies

Posted by Community Admin on 02-Feb-2012 00:00

How do I get the name of the library in the Widget Template below?

Documents & Files:

Posted by Community Admin on 09-Feb-2012 00:00

Hello Laura,

Are you trying to add the Library property to the "List of documents for direct download" template? If so, you can go to Design >> click on List of Documents for direct download >> Open up "Other Data" >> Add the Library property.

Please let us know if you have anymore questions.

Kind regards,
Grace Hallwachs
the Telerik team

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 Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 03-Aug-2013 00:00

I am also trying to add a column with the Library that the files is in (I suppose grouping by Library would be sufficient).

I've tried the "Design >> click on List of Documents for direct download >> Open up "Other Data" >> Add the Library property" with a variety of results from:
1. Nothing happens ... it inserted the line at the top of the file.
2. An error page (Value cannot be null. Parameter name: source).
3. To a variety of other oddly inserted lines.

Here is the line it tries to insert:
<sitefinity:TextField runat="server" DisplayMode="Read" Value='<%# Eval("Library")%>' />

Here's the original (my adjustments) "Documents & Files:List of documents for direct download" code:
<%@ Control Language="C#" %>
<%@ Register TagPrefix="telerik" Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" %>
<%@ Register TagPrefix="sitefinity" Namespace="Telerik.Sitefinity.Web.UI" Assembly="Telerik.Sitefinity" %>
<%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.PublicControls.BrowseAndEdit" Assembly="Telerik.Sitefinity" %>
<sitefinity:ResourceLinks id="resourcesLinks2" runat="server" UseEmbeddedThemes="true" Theme="Default">
  <sitefinity:ResourceFile Name="Telerik.Sitefinity.Resources.Themes.Basic.Styles.icons.css" Static="true" />
</sitefinity:ResourceLinks>
<sf:BrowseAndEditToolbar ID="browseAndEditToolbar" runat="server" Mode="Edit"></sf:BrowseAndEditToolbar>
<telerik:RadGrid id="documentsGrid" runat="server"
    CssClass="sfdownloadTable sfTableMode"
    skin="Sitefinity">
    <ClientSettings EnableRowHoverStyle="false" EnableAlternatingItems="false" />
    <PagerStyle Mode="NumericPages" />
    <MasterTableView PageSize="50" EnableNoRecordsTemplate="true">
   <Columns>
            <telerik:GridTemplateColumn 
                UniqueName="templateColumn" 
                HeaderText="<%$ Resources:Labels, Download %>"
                ItemStyle-CssClass="sfdownloadCell" HeaderStyle-CssClass="sfdownloadCell">
                <ItemTemplate>
                    <sitefinity:SitefinityHyperLink ID="documentLink" Text="<%$ Resources:Labels, Download %>"  runat="server" CssClass="sfdownloadLink" target="_blank" />
                </ItemTemplate>
            </telerik:GridTemplateColumn>
              <telerik:GridBoundColumn UniqueName="title" HeaderText="<%$ Resources:Labels, File %>" DataField="Title" ItemStyle-CssClass="sfdownloadTitle" HeaderStyle-CssClass="sfdownloadTitle" />
            <telerik:GridBoundColumn UniqueName="documentType" HeaderText="<%$ Resources:Labels, Type %>" DataField="Extension" ItemStyle-CssClass="sfdownloadType" HeaderStyle-CssClass="sfdownloadType" />
            <telerik:GridBoundColumn UniqueName="totalSize" HeaderText="<%$ Resources:Labels, Size %>" DataField="TotalSize" ItemStyle-CssClass="sfdownloadSize" HeaderStyle-CssClass="sfdownloadSize" />
        </Columns>
   <NoRecordsTemplate>No documents found!</NoRecordsTemplate>  
    </MasterTableView>
</telerik:RadGrid>
<sitefinity:Pager id="pager" runat="server"></sitefinity:Pager>

Thanks,
Bob Fornal

This thread is closed