mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
@@ -80,6 +80,13 @@ namespace Orchard.Autoroute.Handlers {
|
|||||||
part.DisplayAlias = _autorouteService.Value.GenerateAlias(part);
|
part.DisplayAlias = _autorouteService.Value.GenerateAlias(part);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if the generated alias is empty, compute a new one
|
||||||
|
if (String.IsNullOrWhiteSpace(part.DisplayAlias)) {
|
||||||
|
_autorouteService.Value.ProcessPath(part);
|
||||||
|
_orchardServices.Notifier.Warning(T("The permalink could not be generated, a new slug has been defined: \"{0}\"", part.Path));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// should it become the home page ?
|
// should it become the home page ?
|
||||||
if (part.DisplayAlias != "/" && _orchardServices.Authorizer.Authorize(Permissions.SetHomePage)) {
|
if (part.DisplayAlias != "/" && _orchardServices.Authorizer.Authorize(Permissions.SetHomePage)) {
|
||||||
// if it's the current home page, do nothing
|
// if it's the current home page, do nothing
|
||||||
|
|||||||
Reference in New Issue
Block a user