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

[Solved] ScriptRegistrar DefaultPath with many folders

0 Answers 71 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.
Alexandre Jobin
Top achievements
Rank 1
Alexandre Jobin asked on 11 Aug 2011, 06:25 PM
hi!

my Scripts folder is like this:

/Scripts
/Scripts/Telerik

with the ScriptRegistrar, i would like to do something like this:

Html.Telerik().ScriptRegistrar()
    .Globalization(true)
    .jQuery(true)
    .DefaultGroup(group =>
    {
        group
            .DefaultPath("~/Scripts")
            .Add("jquery.tmpl.js")
            .Add("jquery.typewatch.js")
            .Add("jquery.watermark.js")
            .Add("jquery.ui.inlineEdit.js")
            .Add("/telerik/telerik.common.js")
            .Add("/telerik/telerik.autocomplete.js")
            .Add("/telerik/telerik.calendar.js")
            .Combined(true).Compress(true);
    })
    .Render();

as you can see, the DefaultPath is "~/Scripts" but the ScriptRegistrar will not render correctly all my telerik scripts because they are in a subfolder. They always search them in the root of the ~/Scripts folder! Why it doesnt render the path correctly like this: ~Scripts/Telerik/telerik.common.js ?

thank you!
Tags
General Discussions
Asked by
Alexandre Jobin
Top achievements
Rank 1
Share this question
or