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

StylesheetRegistrar and ScriptRegistrar Pathing

1 Answer 105 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.
Brian Mains
Top achievements
Rank 1
Brian Mains asked on 01 Dec 2009, 05:52 PM
Hello,

It seems like scripts that are used within the stylesheet registrar and script registrar have to all be in the same folder?  I want to setup the app like:

Scripts
    Telerik - Telerik scripts here
    App - My scripts here
    JQuery - JQuery scripts/plugins here

For CSS, it's less complex but generally the same concept.  I would like to take advantage of the ability to use your ScriptRegistrar, but using different paths for scripts.  Is that possible, or will be possible in a different release?

Thanks.

1 Answer, 1 is accepted

Sort by
0
Kazi Manzur Rashid
Telerik team
answered on 02 Dec 2009, 10:55 PM
Hello Brian Mains,

Not actually, you can mix match your path the way you like it. Each asset group of ScriptRegistrar
and StyleRegistrar has a DefaultPath which you can set if you do not want to specify the same folder name again and again with the script file and the Script file also supports the complete path.

For example:

<% Html.Telerik().ScriptRegistrar()
                 .Scripts(scripts => scripts.AddGroup("MyGroup", group =>
                                                group.DefaultPath("~/Scripts/App")
                                                     .Add("myFile1.js")
                                                     .Add("myFile2.js")
                                                     .Add("~/Scripts/jQuery/Plugin1.js")))
                 .Render(); %>

All the best,
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.
Tags
General Discussions
Asked by
Brian Mains
Top achievements
Rank 1
Answers by
Kazi Manzur Rashid
Telerik team
Share this question
or