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

Forums / Developing with Sitefinity / Generic content

Generic content

4 posts, 0 answered
  1. Razia
    Razia avatar
    9 posts
    Registered:
    10 Jun 2010
    24 Jun 2010
    Link to this post
    in the generic content of sitefinity,  when uploading a document , and choosing from already uploaded documents and selecting the tab files , i get the list of all the files that are found in the website directory. i want to restrict the view to certain folder only. is it possible to override the binding of the content to specific files only?
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    30 Jun 2010
    Link to this post
    Hi Razia,

    Thank you for using our services.

    Unfortunately this is not possible with the current dialog. Most of the methods used are either private or internal so overriding the classes used will not help. The easiest approach to this is to go to ~/Sitefnity/Admin/ControlTemplates/Libraries/Dialogs/ItemSelector.ascx and substitute the control which populates the folders with a custom one:
    <telerik:RadPageView runat="server" ID="pageViewFiles">
        <div id="fileManagerWrapepr"><cc:UrlWebEditor id="urlWebEditor" runat="server" /></div>

    The highlighted control has to be replaced a custom WebUITypeEditor which will return the path to the selected file. You can find example on how to create WebUITypeEditor here.

    Best wishes,
    Radoslav Georgiev
    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
  3. Razia
    Razia avatar
    9 posts
    Registered:
    10 Jun 2010
    30 Jun 2010
    Link to this post
    Hi,
    Thanks a lot for your reply

    I have followed your example and able to replace it by a custom user control. can you help me and  explain to me how can i return the path of the selected file.

    Thanks a lot
    Razia
  4. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    02 Jul 2010
    Link to this post
    Hello Razia,

    Can you try the attached control and its template. It is using RadFileExplorer to handle document selection.


    Sincerely yours,
    Radoslav Georgiev
    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
Register for webinar
4 posts, 0 answered