I've done something similar recently, adding a LaunchKey login option to the login screen and faced the same issue. Not wanting to modify the core files, the best way I came up with was to register an interceptor on the $httpProvider and have it redirect any requests for the login.html file to my custom login page (basically a duplication of the core one but with my custom markup in there too).
angular.module('umbraco.services').config([
'$httpProvider',
function ($httpProvider) {
$httpProvider.interceptors.push(function ($q) {
return {
'request': function (config) {
// Redirect any requests to the login dialog to our custom dialog
if (config.url == "views/common/dialogs/login.html")
config.url = '/App_Plugins/LaunchKey/Views/launchKey.LoginDialog.html';
return config || $q.when(config);
}
};
});
}]);
Depending on how you intend to incorporate the feature, if you just want to insert a link to a seperate page to do the reset password, you should be able add the link to your custom markup and just reuse the in built controller for the login page. If you want to do it inline however, you will likely need to duplicate / alter the controller class too and have your new custom view use that controller instead.
Anyways, this should give you something to chew on for the mean time though :)
Extending Login Screen
Is it possible to extend or switch out the login screen in umbraco 7?
I am adding a reset password feature to the login screen, but I dont want to work directly in the umbraco files to avoid upgrade issues.
Hi Neil,
I've done something similar recently, adding a LaunchKey login option to the login screen and faced the same issue. Not wanting to modify the core files, the best way I came up with was to register an interceptor on the
$httpProvider
and have it redirect any requests for thelogin.html
file to my custom login page (basically a duplication of the core one but with my custom markup in there too).Depending on how you intend to incorporate the feature, if you just want to insert a link to a seperate page to do the reset password, you should be able add the link to your custom markup and just reuse the in built controller for the login page. If you want to do it inline however, you will likely need to duplicate / alter the controller class too and have your new custom view use that controller instead.
Anyways, this should give you something to chew on for the mean time though :)
Many thanks
Matt
is working on a reply...