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

Forums / Designing & Styling / Get Library Name into the Download List Template

Get Library Name into the Download List Template

3 posts, 0 answered
  1. Laura
    Laura avatar
    311 posts
    Registered:
    25 Feb 2008
    02 Feb 2012
    Link to this post
    How do I get the name of the library in the Widget Template below?

    Documents & Files:
  2. Grace Hallwachs
    Grace Hallwachs avatar
    144 posts
    Registered:
    03 Nov 2014
    09 Feb 2012
    Link to this post
    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
  3. Bob
    Bob avatar
    2 posts
    Registered:
    16 Jul 2013
    03 Aug 2013
    Link to this post
    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

3 posts, 0 answered