Try Now
More in this section

Forums / Designing with Sitefinity / Themes and Javascript files

Themes and Javascript files

2 posts, 0 answered
  1. Mike
    Mike avatar
    221 posts
    19 Aug 2008
    15 Oct 2008
    Link to this post
    I have a number of Javascript files that i need to include into the site. I have added them to the App_Themes folder. How do i include this Javascript file how it should be included... I am sure they is a certain way to do this in SiteFinity...


  2. Georgi
    Georgi avatar
    3583 posts
    10 Oct 2016
    15 Oct 2008
    Link to this post
    Hello Nugs,

    Well one easy way is not to add them in the App_Themes folder but to create sub folder with JS(example) name in the  App_Master then you Copy/Paste the Default.master page and simply rename it for example JSTemplate.master. Edit this master page and add:
    <head runat="server"
    <script src="/YourProject'sName/App_Master/JS/js.js" type="text/javascript"></script> 

    this will add a file called js.js and from there you can use the functions defined in it.
    The benefit of this is that you can use the JSTemplate template with the default Themes.

    Best wishes,
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
2 posts, 0 answered