Browse Source

Merge pull request #17800 from abpframework/cmskit-slug-fix

Remove backward compatible CMS kit page URLs
pull/17813/head
Engincan VESKE 3 years ago
committed by GitHub
parent
commit
7492820561
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      modules/cms-kit/src/Volo.CmsKit.Public.Web/CmsKitPublicWebModule.cs
  2. 3
      modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Pages/Index.cshtml

11
modules/cms-kit/src/Volo.CmsKit.Public.Web/CmsKitPublicWebModule.cs

@ -73,13 +73,16 @@ public class CmsKitPublicWebModule : AbpModule
options.KeyPrefix = "CmsKit:"; options.KeyPrefix = "CmsKit:";
}); });
Configure<AbpEndpointRouterOptions>(options => if (GlobalFeatureManager.Instance.IsEnabled<PagesFeature>())
{ {
options.EndpointConfigureActions.Add(context => Configure<AbpEndpointRouterOptions>(options =>
{ {
context.Endpoints.MapCmsPageRoute(); options.EndpointConfigureActions.Add(context =>
{
context.Endpoints.MapCmsPageRoute();
});
}); });
}); }
} }
public override void PostConfigureServices(ServiceConfigurationContext context) public override void PostConfigureServices(ServiceConfigurationContext context)

3
modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Pages/Index.cshtml

@ -1,4 +1,5 @@
@page "/pages/{**slug}" @page "/cmskit/page"
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bootstrap @addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bootstrap
@using Volo.CmsKit.Contents @using Volo.CmsKit.Contents
@using Volo.CmsKit.Web.Pages.CmsKit.Components.Contents @using Volo.CmsKit.Web.Pages.CmsKit.Components.Contents

Loading…
Cancel
Save