Some more code to give you an idea on whats happening...
Breakpoint is hit in the ApplicationStarted but never goes to umbracoPage_Init.
protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
{
umbraco.presentation.masterpages.umbracoPage.Init += umbracoPage_Init;
}
void umbracoPage_Init(object sender, EventArgs e)
{
// make sure the page is an umbracoPage; otherwise exit
var page = sender as umbraco.presentation.masterpages.umbracoPage;
if (page == null)
return;
// check that the path is allowed
var path = page.Page.Request.Path.ToLower();
if (!path.Contains("umbraco"))
return;
// attempt to find/create the ClientDependency loader for the page
bool created;
var loader = UmbracoClientDependencyLoader.TryCreate(page, out created);
if (loader != null)
{
// set the custom path for your plugin
loader.AddPath("DTPicker", IOHelper.ResolveUrl("~/js/bsDateTime"));
// load the JavaScript resources
loader.RegisterDependency(998, "datetimepicker.css", "DTPicker", ClientDependency.Core.ClientDependencyType.Css);
loader.RegisterDependency(999, "datetimepicker.js", "DTPicker", ClientDependency.Core.ClientDependencyType.Javascript);
}
}
Umbraco 7 umbracoPage.Init not fired
Hello,
In my ApplicationEventHandler I registered umbracoPage.Init but whatever i try the handle is never called.
I could find any example to use it with 7.
Any Ideas?
Some more code to give you an idea on whats happening...
Breakpoint is hit in the ApplicationStarted but never goes to umbracoPage_Init.
Anyone? up?
is working on a reply...