This is a migrated thread and some comments may be shown as answers.

[Solved] Default location of scripts / css

5 Answers 187 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Alec
Top achievements
Rank 1
Alec asked on 19 Aug 2009, 04:25 PM
How does one change the location of where the scripts are located? By default the extensions assume you have the jQuery file in the "~/Scripts/" directory, which in my case is not where it resides.

I need to change the referenced path, but for the life of me cannot see how this is done.

Thank you
Alec

5 Answers, 1 is accepted

Sort by
0
Kazi Manzur Rashid
Telerik team
answered on 20 Aug 2009, 02:41 PM
Hi Alec,

To change the default path of all the instance you can use the following code in global.asax usually the Application_Start event:

WebAssetDefaultSettings.StyleSheetFilesPath = "~/assets/stylesheets";
WebAssetDefaultSettings.ScriptFilesPath = "~/assets/scripts";

To change of a specific web asset group use the DefaultPath method.

Thanaks,
Kazi Manzur Rashid
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.
0
Mark Galbreath
Top achievements
Rank 2
answered on 24 Nov 2009, 08:19 PM
To change of a specific web asset group use the DefaultPath method. 

Would you please explain this?  My mind-reading powers have diminished with age.
0
Kazi Manzur Rashid
Telerik team
answered on 27 Nov 2009, 12:41 AM
Hello Mark Galbreath,

You can change the deault path of a StyleSheetRegistrar with the following code:

<%= Html.Telerik().StyleSheetRegistrar()
                  .DefaultGroup(group => group.DefaultPath("~/YourPath")
                                              .Add("Site.css")
                                              .Add("telerik.common.css")
                                              .Add("telerik.vista.css")
                                              .Combined(true)
                               ) %>

Best wishes,
Kazi Manzur Rashid
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
roger
Top achievements
Rank 1
answered on 23 Jan 2010, 07:55 PM
But this still includes the version number like: /Content/2009.3.1320 ......
0
Atanas Korchev
Telerik team
answered on 29 Jan 2010, 09:26 AM
Hi roger,

Yes this is by design. First we look for the path with appended version then in the path itself.

Regards,
Atanas Korchev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
General Discussions
Asked by
Alec
Top achievements
Rank 1
Answers by
Kazi Manzur Rashid
Telerik team
Mark Galbreath
Top achievements
Rank 2
roger
Top achievements
Rank 1
Atanas Korchev
Telerik team
Share this question
or