Browse Source
Merge pull request #7563 from abpframework/routing-fix
CMS Kit - Page routing fix
pull/7590/head
Enis Necipoglu
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
5 additions and
4 deletions
-
modules/cms-kit/src/Volo.CmsKit.Public.Web/CmsKitPublicWebModule.cs
|
|
|
@ -1,5 +1,4 @@ |
|
|
|
using System.Linq; |
|
|
|
using Microsoft.AspNetCore.Mvc.RazorPages; |
|
|
|
using Microsoft.AspNetCore.Mvc.RazorPages; |
|
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
|
using Volo.Abp.AspNetCore.Mvc.Localization; |
|
|
|
using Volo.Abp.AutoMapper; |
|
|
|
@ -56,13 +55,15 @@ namespace Volo.CmsKit.Public.Web |
|
|
|
{ |
|
|
|
options.AddMaps<CmsKitPublicWebModule>(validate: true); |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
public override void PostConfigureServices(ServiceConfigurationContext context) |
|
|
|
{ |
|
|
|
Configure<RazorPagesOptions>(options => |
|
|
|
{ |
|
|
|
if (GlobalFeatureManager.Instance.IsEnabled<PagesFeature>()) |
|
|
|
{ |
|
|
|
// TODO: Work on this route logic. Blocks some routes with this logic.
|
|
|
|
options.Conventions.AddPageRoute("/CmsKit/Pages/Index", "/{*pageUrl}"); |
|
|
|
options.Conventions.AddPageRoute("/CmsKit/Pages/Index", @"{*pageUrl:minlength(1)}"); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
|