More in this section

Forums / Developing with Sitefinity / News module thumbnail upload path

News module thumbnail upload path

2 posts, 0 answered
  1. Devin
    Devin avatar
    149 posts
    09 Jun 2009
    04 Feb 2010
    Link to this post
    Hi is there a way to change the default thumbnail upload path in the news module?  Currently, the news module is defaulting to ~/images and I'd like it to default to ~/images/news.

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    12 Sep 2017
    05 Feb 2010
    Link to this post
    Hello Devin,

    You have to create a custom class that inherits from LibrarySelector which uses ~/Sitefinity/Admin/ControlTemplates/Libraries/Dialogs/BaseGuidSelectorTemplate.ascx". Then override CreateChildControls() in your custom class and set the default folder

    UploadFolder.DefaultUploadFolder = "~/NewsImages/";
    // call the base class and set the property
    base.SelectAllItemsText = UploadFolder.DefaultUploadFolder;
    string libraryName = "NewsImages";
    library = ((LibraryManager)this.Manager).GetLibrary(libraryName);
    if (library != null)
        this.Container.List.SelectedIndex = 1;
        base.Container.RepeaterControl.ItemDataBound += new RepeaterItemEventHandler(RepeaterControl_ItemDataBound);

    All the best,
    Ivan Dimitrov
    the Telerik team

    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Follow the status of features or bugs in PITS and vote for them to affect their priority.
2 posts, 0 answered