TemplateManager Needs To Refresh

6 posts, 0 answers
  1. CBARS
    CBARS avatar
    55 posts
    Member since:
    Sep 2008

    Posted 10 Mar 2009 Link to this post

    I am using RadEditor in such a way that it saves the editor's contents into an html file. It uses template manager to insert the saved templates. My problem occurs with template manager, as it doesn't refresh the new versions of the html files. Only after restarting the web application, template manager inserts the correct versions of the html files.

    The reason why I'm using template manager is because RadEditor does not have another means of inserting external files that I'm aware of.

    Any help will be greatly appreciated!!
  2. CBARS
    CBARS avatar
    55 posts
    Member since:
    Sep 2008

    Posted 10 Mar 2009 Link to this post

    I have found a solution. After the file is saved, it needs to be uploaded into Template Manager. Now is there any way to upload this file without going through the whole process in Template Manager?

    Can I please get some help on this.
    Thank you!
  3. Rumen
    Admin
    Rumen avatar
    13980 posts

    Posted 10 Mar 2009 Link to this post

    Hello Marcel,

    Why don't you save the template file directly in the upload folder of the Template manager. Thus you will avoid the file upload.

    In addition, you can find useful the information shared in this forum thread: how do i find the file selected via the template manager dialog?.

    Best regards,
    Rumen
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  4. CBARS
    CBARS avatar
    55 posts
    Member since:
    Sep 2008

    Posted 10 Mar 2009 Link to this post

    Thanx for the speedy reply Rumen.

    The reason why I need to upload the file, is because template manager doesn't refresh. In other words, it keeps inserting the same file even after the file's contents have been changed. Only after I upload the file, or restart the web application, template manager inserts the correct version of the file.

    So what I want to know, is how to call an upload through my code. As I want to call this upload whenever the save button is clicked, which will correct the problem I have with template manager.

    Thank you.
  5. CBARS
    CBARS avatar
    55 posts
    Member since:
    Sep 2008

    Posted 10 Mar 2009 Link to this post

    I have found an unacceptable solution:

    Template manager seems to work as it's supposed to whenever a file is uploaded with the same name as an existing file, and the overwrite file option is NOT checked, and upload is clicked. Hereafter template manager seems to function as it should. It succesfully inserts the newest versions of files and template previewer functions correctly.

    Can you please help as this solution is tedious and not at all practical.
  6. Rumen
    Admin
    Rumen avatar
    13980 posts

    Posted 13 Mar 2009 Link to this post

    Hi Marcel,

    The caching is not related to the editor's template manager but to the browser caching mechanism.
    You can try to prevent the caching by using the instructions in these articles:
    How to prevent caching in Internet Explorer
    and
    Useful HTML Meta Tags.

    Another approach is to save the file with an unique name. Thus the file content will be always inserted as it is and it will not be cached.

    Best regards,
    Rumen
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top