More in this section
Forums / Designing & Styling / Get Library Name into the Download List Template

Get Library Name into the Download List Template

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
3 posts, 0 answered
  1. Laura
    Laura avatar
    311 posts
    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
    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
    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" />
    <sf:BrowseAndEditToolbar ID="browseAndEditToolbar" runat="server" Mode="Edit"></sf:BrowseAndEditToolbar>
    <telerik:RadGrid id="documentsGrid" runat="server"
        CssClass="sfdownloadTable sfTableMode"
        <ClientSettings EnableRowHoverStyle="false" EnableAlternatingItems="false" />
        <PagerStyle Mode="NumericPages" />
        <MasterTableView PageSize="50" EnableNoRecordsTemplate="true">
                    HeaderText="<%$ Resources:Labels, Download %>"
                    ItemStyle-CssClass="sfdownloadCell" HeaderStyle-CssClass="sfdownloadCell">
                        <sitefinity:SitefinityHyperLink ID="documentLink" Text="<%$ Resources:Labels, Download %>"  runat="server" CssClass="sfdownloadLink" target="_blank" />
                  <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" />
       <NoRecordsTemplate>No documents found!</NoRecordsTemplate>  
    <sitefinity:Pager id="pager" runat="server"></sitefinity:Pager>

    Bob Fornal

3 posts, 0 answered