More in this section
Forums / General Discussions / File downloads

File downloads

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.
2 posts, 0 answered
  1. Curtis
    Curtis avatar
    1 posts
    Registered:
    09 Dec 2010
    09 Dec 2010
    Link to this post
    I am brand new to Sitefinity so please excuse me if this is a stupid question.  I am about to begin working on a site that was developed with this CMS and just finding my way around.  But I have been asked by someone to supply a copy of the CSS file for another project to duplicate the look and feel.  I found instructions for "Enable file download in File Manager" but step two says "In the ManageFiles control: add the showDownload Link attribute and set it to true.

    For the life of me I cannot see the "ManageFiles control" nor do I even know what to look for.  Can anyone point me in the right direction?  Many thanks --cjw
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    10 Dec 2010
    Link to this post
    Hello Curtis,

    You have to open Sitefinity/Admin/Files.aspx file and modify it as shown below

    <%@ Page Language="C#" MasterPageFile="~/Sitefinity/Admin/Admin.master" AutoEventWireup="true" CodeFile="Files.aspx.cs" Inherits="Admin_Files" Title="Untitled Page" %>
     
    <%@ Register TagPrefix="telerik" Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" %>
    <%@ Register Assembly="Telerik.FileManager" Namespace="Telerik.FileManager" TagPrefix="cc1" %>
    <%@ Register Assembly="Telerik.FileManager" Namespace="Telerik.FileManager.WebControls" TagPrefix="cc2" %>
    <%@ Register Assembly="Telerik.Cms.Web.UI" Namespace="Telerik.Cms.Web.UI" TagPrefix="sfWeb" %>
     
    <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
        <div id="main">
            <div class="in">
                <div runat="server" id="mainPanel">
                    <cc1:ManageFiles Visible="true" runat="server" ID="fileManager" ShowDownloadLink="true">
                        <FilesUploaderTemplate>
                        <div class="ToolsAll">
                            <sfWeb:MessageControl runat="server" ID="message">
                                <ItemTemplate>
                                    <asp:Literal runat="server" ID="messageText"></asp:Literal>
                                </ItemTemplate>
                            </sfWeb:MessageControl>
                            <div class="backWrapp">
                                <asp:LinkButton ID="cancelUploadButton" runat="server" CssClass="actions back"><asp:Literal runat="server" Text="<%$Resources:CancelAndGoBack %>"></asp:Literal></asp:LinkButton>
                            </div>
                        </div>
                        <div class="workArea insert">
                            <div class="mainForm">
                            <h3 class="uplHead"><asp:Literal runat="server" Text="<%$Resources:SelectFilesToUpload %>"></asp:Literal></h3>
                            <div class="set">
                                <div class="setIn">
                                <telerik:RadUpload
                                ID="uploader"
                                InitialFileInputsCount="10"
                                runat="server"
                                ControlObjectsVisibility="AddButton"
                                Width="400"
                                EnableEmbeddedSkins="false"
                                Skin="Sitefinity"
                                />
                                <!--<asp:Repeater ID="uploadedHistory" runat="server">
                                <ItemTemplate>
                                    <asp:Repeater ID="filesList" runat="server">
                                        <ItemTemplate>
                                            <asp:Literal ID="fileName" runat="server"></asp:Literal>
                                        </ItemTemplate>
                                    </asp:Repeater>
                                </ItemTemplate>
                            </asp:Repeater>-->
                                </div>
                            </div>
                            <div class="bottom"><div><!-- --></div></div>
                            <p class="button_area">
                                <asp:LinkButton ID="uploadButton" runat="server" CssClass="CmsButLeft upldark"><strong class="CmsButRight dark"><asp:Literal runat="server" Text="<%$Resources:Upload %>"></asp:Literal></strong></asp:LinkButton>
                                <span><asp:Literal runat="server" Text="<%$Resources:Or %>"></asp:Literal></span>
                                <asp:LinkButton ID="cancelUploadButton1" runat="server" cssClass="cmscclcmd" Text="<%$Resources:Cancel %>"></asp:LinkButton>
                            </p>
                            
                            </div>
                        <div class="info" id="divFaq" runat="server">
                            <div class="infoBottom">
                                <h3><asp:Literal runat="server" Text="<%$Resources:HowToUpload %>"></asp:Literal></h3>
                                <asp:Literal runat="server" Text="<%$Resources:HowToUploadText %>"></asp:Literal>
                                <p class="hideAllFAQs">
                                    <a runat="server" id="lnkHideFaq" href="javascript:void(0)">Hide FAQs everywhere</a>
                                </p>
                                <!--<h3>Where to upload?</h3>
                                <dl class="faq">
                                    <dt>Masterpages</dt>
                                    <dd>In the <em>App_master</em> folder and use them as templates.</dd>
                                    <dt>Css files</dt>
                                    <dd>If you are using Css files as Themеs, upload them in the <a class="HelpBox"></a> <em>App_Themes</em> folder. If they are linked to a given page, upload them wherever you like but be careful when setting the path in the link to them.</dd>
                                    <dt>Images, video, flash</dt>
                                    <dd>In the Images folder or anywhere else you find appropriate. Careful with paths.</dd>
                                </dl>-->
                            </div>
                        </div>
                    <div class="clear"><!-- --></div>
                    </div>
                        </FilesUploaderTemplate>
                        <FilesGridTemplate>
                        <div class="workArea temp">
                            <div class="mainForm">                 
                            <telerik:RadGrid ID="fileGrid"
                                          runat="server"
                                          BorderWidth="0"
                                          MasterTableView-GridLines="None"
                                          AllowSorting="true"
                                          AllowPaging="true"
                                          PageSize="20"
                                          PagerStyle-Mode="NextPrevAndNumeric"
                                          CellPadding="3"
                                          MasterTableView-EditMode="InPlace"
                                          AllowMultiRowSelection="true"
                                          AllowMultiRowEdit="false"
                                          EnableEmbeddedSkins="false"
                                          Skin="Sitefinity"
                                          >
                              <ClientSettings Resizing-AllowColumnResize="true"
                                              Resizing-AllowRowResize="false"
                                              AllowColumnsReorder="false"
                                              Selecting-AllowRowSelect="true"
                                              ClientEvents-OnRowContextMenu="OnFilesListContextClick"
                                              ClientEvents-OnRowCreated="OnFilesListRowCreated"
                                              Selecting-EnableDragToSelectRows="false"
                                             >
                              </ClientSettings>
                              <MasterTableView AutoGenerateColumns="false">
                                <Columns>
                                    <telerik:GridBoundColumn DataField="Extension"
                                                          UniqueName="Icon"
                                                          HeaderStyle-Width="30"
                                                          HeaderStyle-HorizontalAlign="center"
                                                          ReadOnly="true"></telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="Name"
                                                          UniqueName="Name"
                                                          HeaderText="<%$Resources:Name %>"></telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="Size"
                                                          UniqueName="Size"
                                                          HeaderText="<%$Resources:Size %>"
                                                          HeaderStyle-Width="60"
                                                          ItemStyle-HorizontalAlign="Right"
                                                          ReadOnly="true"></telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="Extension"
                                                          UniqueName="Extension"
                                                          HeaderText="<%$Resources:Extension %>"
                                                          HeaderStyle-Width="60"
                                                          HeaderStyle-HorizontalAlign="right"
                                                          ItemStyle-HorizontalAlign="right"
                                                          ReadOnly="true"></telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="DateModified"
                                                          UniqueName="DateModified"
                                                          HeaderText="<%$Resources:DateModified %>"
                                                          DataFormatString="<%$Resources:DateModifiedFormat %>"
                                                          HeaderStyle-Width="130"
                                                          HeaderStyle-HorizontalAlign="left"
                                                          ReadOnly="true"></telerik:GridBoundColumn>
                                   <telerik:GridHyperLinkColumn  
                                                          UniqueName="DownloadLink"
                                                          Target="_blank"
                                                          Text="Download"
                                                          HeaderStyle-Width="20"
                                                          HeaderStyle-HorizontalAlign="center"></telerik:GridHyperLinkColumn>
                                </Columns>
                              </MasterTableView>
                              <PagerStyle Mode="NumericPages" />
                            </telerik:RadGrid>
                            <telerik:RadContextMenu ID="gridContextMenu"
                                          runat="server"
                                          EnableEmbeddedSkins="false"
                                          Skin="Sitefinity"
                                          >
                                          <Targets>
                                          <telerik:ContextMenuElementTarget ElementID="gridElementTarget" />
                                          </Targets>
                            </telerik:RadContextMenu>
                            </div>
                            <div class="info" id="divFaq" runat="server">
                                <div class="infoBottom">
                                    <h3><asp:Literal runat="server" Text="<%$Resources:FilesFAQ %>"></asp:Literal></h3>
                                    <asp:Literal runat="server" Text="<%$Resources:FilesFAQText %>"></asp:Literal>
                                    <p class="hideAllFAQs">
                                        <a runat="server" id="lnkHideFaq" href="javascript:void(0)">Hide FAQs everywhere</a>
                                    </p>
                                </div>
                            </div>
                            <div class="clear"><!-- --></div>
                            </div>
                        </FilesGridTemplate>
                    </cc1:ManageFiles>
                </div>
                </div>
            </div>
        <div id="subnav">
            <div class="in">
            <h2><asp:Literal runat="server" Text="<%$Resources:SelectAFolder %>"></asp:Literal></h2>
            <div class="folderTreeViewPlh">
                <cc2:FoldersNavigation id="foldersNavigation" runat="server">
                    <FoldersNavigationTemplate>
                        <telerik:RadTreeView ID="foldersTree"
                                          runat="server"
                                          AutoPostBack="true"                 
                                          EnableDragAndDrop="true"
                                          AllowNodeEditing="true"
                                          SingleExpandPath="true"
                                          EnableDragAndDropBetweenNodes="true"
                                          EnableEmbeddedSkins="false"
                                          Skin="SitefinityFiles"                                     
                                          >
                        </telerik:RadTreeView>
                        <telerik:RadContextMenu ID="foldersContextMenu"
                                          runat="server"
                                          EnableEmbeddedSkins="false"
                                          Skin="Sitefinity" >
                                          <Targets>
                                          <telerik:ContextMenuElementTarget ElementID="foldersElementTarget" />
                                          </Targets>
                            </telerik:RadContextMenu>
                    </FoldersNavigationTemplate>
                </cc2:FoldersNavigation>
            </div>
            </div>
        </div>
        <div class="clear width"><!-- --></div>
    </asp:Content>


    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
2 posts, 0 answered