You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I may have been using Smidge wrong but I've spent most of the day chasing my tail so I thought I'd ask. I was upgrading an old Umbraco V7 site to V9.5. The old site's views included specific css and js files pertinent to that view using @Sections (header and footer). I thought I could just use Smidge for that. Turns out I couldn't because I had no way to control the order of loading. If JQuery was included with the Base template, then anything that needed JQuery in the child templates errorred due to lack of JQuery because they were loaded before the scripts in the Base template and I had no control over this.
// Set up local JS
SmidgeHelper.RequiresJs("~/scripts/slimmage.min.js");
SmidgeHelper.RequiresJs("~/scripts/bootstrap.min.js");
SmidgeHelper.RequiresJs("~/scripts/common.js");
Then in the Master template
@await SmidgeHelper.JsHereAsync()
Would it be possible to include an index number to control the loading order?
Or, have I just made some silly assumptions? For now, I decided not to use Smidge on this project and have reverted to traditional, unbundled links to pre-minified files.
Cheers
The text was updated successfully, but these errors were encountered:
I may have been using Smidge wrong but I've spent most of the day chasing my tail so I thought I'd ask. I was upgrading an old Umbraco V7 site to V9.5. The old site's views included specific css and js files pertinent to that view using @Sections (header and footer). I thought I could just use Smidge for that. Turns out I couldn't because I had no way to control the order of loading. If JQuery was included with the Base template, then anything that needed JQuery in the child templates errorred due to lack of JQuery because they were loaded before the scripts in the Base template and I had no control over this.
Then in the Master template
@await SmidgeHelper.JsHereAsync()
Would it be possible to include an index number to control the loading order?
Or, have I just made some silly assumptions? For now, I decided not to use Smidge on this project and have reverted to traditional, unbundled links to pre-minified files.
Cheers
The text was updated successfully, but these errors were encountered: