Browse Source
Merge pull request #7448 from abpframework/enisn/cms-kit/pages-route-feature-check
CmsKit - Add feature check to CmsKit Pages route configuration
pull/7449/head
İlkay İlknur
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
7 additions and
1 deletions
-
modules/cms-kit/src/Volo.CmsKit.Public.Web/CmsKitPublicWebModule.cs
|
|
|
@ -3,9 +3,11 @@ using Microsoft.AspNetCore.Mvc.RazorPages; |
|
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
|
using Volo.Abp.AspNetCore.Mvc.Localization; |
|
|
|
using Volo.Abp.AutoMapper; |
|
|
|
using Volo.Abp.GlobalFeatures; |
|
|
|
using Volo.Abp.Modularity; |
|
|
|
using Volo.Abp.UI.Navigation; |
|
|
|
using Volo.Abp.VirtualFileSystem; |
|
|
|
using Volo.CmsKit.GlobalFeatures; |
|
|
|
using Volo.CmsKit.Localization; |
|
|
|
using Volo.CmsKit.Public.Web.Menus; |
|
|
|
using Volo.CmsKit.Web; |
|
|
|
@ -57,7 +59,11 @@ namespace Volo.CmsKit.Public.Web |
|
|
|
|
|
|
|
Configure<RazorPagesOptions>(options => |
|
|
|
{ |
|
|
|
options.Conventions.AddPageRoute("/CmsKit/Pages/Index", "/{*pageUrl}"); |
|
|
|
if (GlobalFeatureManager.Instance.IsEnabled<PagesFeature>()) |
|
|
|
{ |
|
|
|
// TODO: Work on this route logic. Blocks some routes with this logic.
|
|
|
|
options.Conventions.AddPageRoute("/CmsKit/Pages/Index", "/{*pageUrl}"); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|