Moved ContentWidgetOptions to web layer

pull/13863/head
malik masis 3 years ago
parent cddbdeebea
commit 7a53738021

@ -36,7 +36,6 @@ using Volo.Abp.Threading;
using Volo.Abp.VirtualFileSystem;
using Volo.CmsKit.Admin.Web;
using Volo.CmsKit.Comments;
using Volo.CmsKit.Contents;
using Volo.CmsKit.EntityFrameworkCore;
using Volo.CmsKit.MediaDescriptors;
using Volo.CmsKit.MultiTenancy;
@ -45,6 +44,7 @@ using Volo.CmsKit.Ratings;
using Volo.CmsKit.Reactions;
using Volo.CmsKit.Tags;
using Volo.CmsKit.Web;
using Volo.CmsKit.Web.Contents;
namespace Volo.CmsKit;

@ -1,9 +0,0 @@
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
namespace Volo.CmsKit.Admin.Contents;
public interface IContentAdminAppService : IApplicationService
{
Task<ListResultDto<ContentWidgetDto>> GetWidgetsAsync();
}

@ -13,4 +13,8 @@
<ProjectReference Include="..\Volo.CmsKit.Common.Application\Volo.CmsKit.Common.Application.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="Volo\CmsKit\Admin\Contents\" />
</ItemGroup>
</Project>

@ -1,32 +0,0 @@
using System.Linq;
using System.Threading.Tasks;
using Microsoft.Extensions.Options;
using Volo.Abp.Application.Dtos;
using Volo.CmsKit.Contents;
namespace Volo.CmsKit.Admin.Contents;
public class ContentAdminAppService : CmsKitAdminAppServiceBase, IContentAdminAppService
{
private readonly CmsKitContentWidgetOptions _options;
public ContentAdminAppService(IOptions<CmsKitContentWidgetOptions> options)
{
_options = options.Value;
}
public virtual Task<ListResultDto<ContentWidgetDto>> GetWidgetsAsync()
{
return Task.FromResult(new ListResultDto<ContentWidgetDto>()
{
Items = _options.WidgetConfigs
.Select(n =>
new ContentWidgetDto
{
Key = n.Key,
Details = new WidgetDetailDto() { EditorComponentName = n.Value.EditorComponentName, Name = n.Value.Name },
}).ToList()
});
}
}

@ -1,22 +0,0 @@
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
using System;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Modeling;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.CmsKit.Admin.Contents;
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Admin.Contents.ClientProxies;
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IContentAdminAppService), typeof(ContentAdminClientProxy))]
public partial class ContentAdminClientProxy : ClientProxyBase<IContentAdminAppService>, IContentAdminAppService
{
public virtual async Task<ListResultDto<ContentWidgetDto>> GetWidgetsAsync()
{
return await RequestAsync<ListResultDto<ContentWidgetDto>>(nameof(GetWidgetsAsync));
}
}

@ -1,7 +0,0 @@
// This file is part of ContentAdminClientProxy, you can customize it here
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Admin.Contents.ClientProxies;
public partial class ContentAdminClientProxy
{
}

@ -1191,35 +1191,6 @@
}
}
},
"Volo.CmsKit.Admin.Contents.ContentAdminController": {
"controllerName": "ContentAdmin",
"controllerGroupName": "ContentAdmin",
"isRemoteService": true,
"apiVersion": null,
"type": "Volo.CmsKit.Admin.Contents.ContentAdminController",
"interfaces": [
{
"type": "Volo.CmsKit.Admin.Contents.IContentAdminAppService"
}
],
"actions": {
"GetWidgetsAsync": {
"uniqueName": "GetWidgetsAsync",
"name": "GetWidgetsAsync",
"httpMethod": "GET",
"url": "api/cms-kit-admin/contents",
"supportedVersions": [],
"parametersOnMethod": [],
"parameters": [],
"returnValue": {
"type": "Volo.Abp.Application.Dtos.ListResultDto<Volo.CmsKit.Admin.Contents.ContentWidgetDto>",
"typeSimple": "Volo.Abp.Application.Dtos.ListResultDto<Volo.CmsKit.Admin.Contents.ContentWidgetDto>"
},
"allowAnonymous": null,
"implementFrom": "Volo.CmsKit.Admin.Contents.IContentAdminAppService"
}
}
},
"Volo.CmsKit.Admin.Comments.CommentAdminController": {
"controllerName": "CommentAdmin",
"controllerGroupName": "CommentAdmin",

@ -1,25 +0,0 @@
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
namespace Volo.CmsKit.Admin.Contents;
[RemoteService(Name = CmsKitAdminRemoteServiceConsts.RemoteServiceName)]
[Area(CmsKitAdminRemoteServiceConsts.ModuleName)]
[Route("api/cms-kit-admin/contents")]
public class ContentAdminController : CmsKitAdminController, IContentAdminAppService
{
protected IContentAdminAppService ContentAdminAppService { get; }
public ContentAdminController(IContentAdminAppService contentAdminAppService)
{
ContentAdminAppService = contentAdminAppService;
}
[HttpGet]
public virtual Task<ListResultDto<ContentWidgetDto>> GetWidgetsAsync()
{
return ContentAdminAppService.GetWidgetsAsync();
}
}

@ -3,38 +3,48 @@ using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.Extensions.Options;
using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form;
using Volo.Abp.AspNetCore.Mvc.UI.RazorPages;
using Volo.CmsKit.Admin.Contents;
using Volo.CmsKit.Contents;
using Volo.CmsKit.Web.Contents;
namespace Volo.CmsKit.Admin.Web.Pages.CmsKit.Contents;
public class AddWidgetModal : AbpPageModel
{
protected IContentAdminAppService ContentAdminAppService { get; }
[BindProperty]
public ContentViewModel ViewModel { get; set; }
public List<SelectListItem> Widgets { get; set; } = new();
public AddWidgetModal(IContentAdminAppService contentAdminAppService)
private readonly CmsKitContentWidgetOptions _options;
public AddWidgetModal(IOptions<CmsKitContentWidgetOptions> options)
{
ContentAdminAppService = contentAdminAppService;
_options = options.Value;
}
public async Task OnGetAsync()
{
var widgets = await ContentAdminAppService.GetWidgetsAsync();
var widgets = _options.WidgetConfigs
.Select(n =>
new ContentWidgetDto
{
Key = n.Key,
Details = new WidgetDetailDto() { EditorComponentName = n.Value.EditorComponentName, Name = n.Value.Name },
}).ToList();
ViewModel = new ContentViewModel()
{
Details = widgets.Items.Select(p => p.Details).ToList()
Details = widgets.Select(p => p.Details).ToList()
};
Widgets = new List<SelectListItem>() { new(string.Empty, string.Empty) };
Widgets.AddRange(widgets
.Items
.Select(w => new SelectListItem(w.Key, w.Details.Name))
.ToList());
}

@ -247,21 +247,6 @@
})();
// controller volo.cmsKit.admin.contents.contentAdmin
(function(){
abp.utils.createNamespace(window, 'volo.cmsKit.admin.contents.contentAdmin');
volo.cmsKit.admin.contents.contentAdmin.getWidgets = function(ajaxParams) {
return abp.ajax($.extend(true, {
url: abp.appPath + 'api/cms-kit-admin/contents',
type: 'GET'
}, ajaxParams));
};
})();
// controller volo.cmsKit.admin.comments.commentAdmin
(function(){

@ -1,6 +1,6 @@
using System.Collections.Generic;
namespace Volo.CmsKit.Contents;
namespace Volo.CmsKit.Web.Contents;
public class CmsKitContentWidgetOptions
{

@ -5,9 +5,10 @@ using System.Threading.Tasks;
using Microsoft.Extensions.Options;
using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
using Volo.CmsKit.Contents;
using static Volo.CmsKit.Contents.ContentConsts;
namespace Volo.CmsKit.Contents;
namespace Volo.CmsKit.Web.Contents;
public class ContentParser : ITransientDependency
{
@ -28,10 +29,10 @@ public class ContentParser : ITransientDependency
});
}
var parsedList = new List<string>();
List<string> parsedList = new();
ParseContent(content, parsedList);
var contentFragments = new List<ContentFragment>();
List<ContentFragment> contentFragments = new();
FillContentFragment(content, parsedList, contentFragments);
return Task.FromResult(contentFragments);

@ -1,7 +1,5 @@
using System;
using System.Collections.Generic;
using Volo.Abp.Application.Dtos;
using Volo.CmsKit.Contents;
using Volo.CmsKit.Users;
namespace Volo.CmsKit.Public.Blogs;
@ -17,8 +15,6 @@ public class BlogPostPublicDto : AuditedEntityDto<Guid>
public string ShortDescription { get; set; }
public List<ContentFragment> ContentFragments { get; set; }
public string Content { get; set; }
public Guid? CoverImageMediaId { get; set; }

@ -13,8 +13,6 @@ public class PageDto : EntityDto<Guid>
public string Slug { get; set; }
public string Content { get; set; }
public List<ContentFragment> ContentFragments { get; set; }
public string Script { get; set; }

@ -1,11 +1,10 @@
using JetBrains.Annotations;
using System;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using JetBrains.Annotations;
using Volo.Abp.Application.Dtos;
using Volo.Abp.GlobalFeatures;
using Volo.CmsKit.Blogs;
using Volo.CmsKit.Contents;
using Volo.CmsKit.GlobalFeatures;
using Volo.CmsKit.Users;
@ -17,16 +16,13 @@ public class BlogPostPublicAppService : CmsKitPublicAppServiceBase, IBlogPostPub
protected IBlogRepository BlogRepository { get; }
protected IBlogPostRepository BlogPostRepository { get; }
protected ContentParser ContentParser { get; }
public BlogPostPublicAppService(
IBlogRepository blogRepository,
IBlogPostRepository blogPostRepository,
ContentParser contentParser)
IBlogPostRepository blogPostRepository)
{
BlogRepository = blogRepository;
BlogPostRepository = blogPostRepository;
ContentParser = contentParser;
}
public virtual async Task<BlogPostPublicDto> GetAsync(
@ -36,10 +32,7 @@ public class BlogPostPublicAppService : CmsKitPublicAppServiceBase, IBlogPostPub
var blogPost = await BlogPostRepository.GetBySlugAsync(blog.Id, blogPostSlug);
var blogPostDto = ObjectMapper.Map<BlogPost, BlogPostPublicDto>(blogPost);
blogPostDto.ContentFragments = await ContentParser.ParseAsync(blogPost.Content);
return blogPostDto;
return ObjectMapper.Map<BlogPost, BlogPostPublicDto>(blogPost);
}
public virtual async Task<PagedResultDto<BlogPostPublicDto>> GetListAsync([NotNull] string blogSlug, BlogPostGetListInput input)

@ -1,6 +1,5 @@
using System.Threading.Tasks;
using Volo.Abp.GlobalFeatures;
using Volo.CmsKit.Contents;
using Volo.CmsKit.GlobalFeatures;
using Volo.CmsKit.Pages;
@ -10,12 +9,10 @@ namespace Volo.CmsKit.Public.Pages;
public class PagePublicAppService : CmsKitPublicAppServiceBase, IPagePublicAppService
{
protected IPageRepository PageRepository { get; }
protected ContentParser ContentParser { get; }
public PagePublicAppService(IPageRepository pageRepository, ContentParser contentParser)
public PagePublicAppService(IPageRepository pageRepository)
{
PageRepository = pageRepository;
ContentParser = contentParser;
}
public virtual async Task<PageDto> FindBySlugAsync(string slug)
@ -27,8 +24,6 @@ public class PagePublicAppService : CmsKitPublicAppServiceBase, IPagePublicAppSe
return null;
}
var pageDto = ObjectMapper.Map<Page, PageDto>(page);
pageDto.ContentFragments = await ContentParser.ParseAsync(page.Content);
return pageDto;
return ObjectMapper.Map<Page, PageDto>(page);
}
}

@ -30,11 +30,9 @@ public class PublicApplicationAutoMapperProfile : Profile
CreateMap<Rating, RatingDto>();
CreateMap<Page, PageDto>()
.Ignore(x => x.ContentFragments);
CreateMap<Page, PageDto>();
CreateMap<BlogPost, BlogPostPublicDto>()
.Ignore(x => x.ContentFragments);
CreateMap<BlogPost, BlogPostPublicDto>();
CreateMap<MenuItem, MenuItemDto>();

@ -21,7 +21,7 @@
@{
string dummyImageSource = "https://dummyimage.com/1280x720/a3a3a3/fff.png?text=" + Model.BlogPost.Title;
string dummyImageSource = "https://dummyimage.com/1280x720/a3a3a3/fff.png?text=" + Model.ViewModel.Title;
var isScrollIndexEnabled = GlobalFeatureManager.Instance.IsEnabled<BlogPostScrollIndexFeature>() && Model.BlogPostScrollIndexFeature?.IsEnabled == true;
}
@ -57,18 +57,18 @@
<div class="row">
<div @Html.Raw(isScrollIndexEnabled ? "class=\"col-md-10 col-sm-12\"" : "class=\"col-md-12\"")>
<abp-card class="mb-4">
<img src="/api/cms-kit/media/@Model.BlogPost.CoverImageMediaId" class="card-img-top" onerror="this.src='@dummyImageSource'" />
<img src="/api/cms-kit/media/@Model.ViewModel.CoverImageMediaId" class="card-img-top" onerror="this.src='@dummyImageSource'" />
<abp-card-body>
<abp-row>
<div class="col-lg-8 col-md-10 mx-auto pb-4">
<h1 class="mt-lg-4 mt-md-3">@Model.BlogPost.Title</h1>
<h1 class="mt-lg-4 mt-md-3">@Model.ViewModel.Title</h1>
<p class="mb-lg-5 mb-md-3">
<a href="/blogs/@Model.BlogSlug?authorId=@Model.BlogPost.Author.Id">
<span class="font-weight-bold">@@@Model.BlogPost.Author?.UserName</span>
<a href="/blogs/@Model.BlogSlug?authorId=@Model.ViewModel.Author.Id">
<span class="font-weight-bold">@@@Model.ViewModel.Author?.UserName</span>
</a>
<small style="opacity:.65;">@Model.BlogPost.CreationTime</small>
<small style="opacity:.65;">@Model.ViewModel.CreationTime</small>
</p>
@foreach (var contentFragment in Model.BlogPost.ContentFragments)
@foreach (var contentFragment in Model.ViewModel.ContentFragments)
{
if (contentFragment.Type == ContentConsts.Markdown)
{
@ -80,9 +80,9 @@
}
}
<p class="mb-3">
@if (Model.BlogPost.LastModificationTime != null)
@if (Model.ViewModel.LastModificationTime != null)
{
<small style="opacity:.65;">@L["LastModification"].Value : @Model.BlogPost.LastModificationTime</small>
<small style="opacity:.65;">@L["LastModification"].Value : @Model.ViewModel.LastModificationTime</small>
}
</p>
<hr />
@ -94,7 +94,7 @@
@await Component.InvokeAsync(typeof(TagViewComponent), new
{
entityType = Volo.CmsKit.Blogs.BlogPostConsts.EntityType,
entityId = Model.BlogPost.Id.ToString(),
entityId = Model.ViewModel.Id.ToString(),
urlFormat = $"/blogs/{Model.BlogSlug}?tagId={{TagId}}"
})
}
@ -111,7 +111,7 @@
@await Component.InvokeAsync(typeof(ReactionSelectionViewComponent), new
{
entityType = Volo.CmsKit.Blogs.BlogPostConsts.EntityType,
entityId = Model.BlogPost.Id.ToString()
entityId = Model.ViewModel.Id.ToString()
})
}
}
@ -124,7 +124,7 @@
@await Component.InvokeAsync(typeof(RatingViewComponent), new
{
entityType = Volo.CmsKit.Blogs.BlogPostConsts.EntityType,
entityId = Model.BlogPost.Id.ToString()
entityId = Model.ViewModel.Id.ToString()
})
}
}
@ -161,7 +161,7 @@
@await Component.InvokeAsync(typeof(DefaultBlogPostCommentViewComponent), new
{
entityType = Volo.CmsKit.Blogs.BlogPostConsts.EntityType,
entityId = Model.BlogPost.Id.ToString()
entityId = Model.ViewModel.Id.ToString()
})
}
}

@ -1,9 +1,11 @@
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.GlobalFeatures;
using Volo.Abp.ObjectMapping;
using Volo.CmsKit.Blogs;
using Volo.CmsKit.GlobalFeatures;
using Volo.CmsKit.Public.Blogs;
using Volo.CmsKit.Web.Contents;
namespace Volo.CmsKit.Public.Web.Pages.Public.CmsKit.Blogs;
@ -15,7 +17,7 @@ public class BlogPostModel : CmsKitPublicPageModelBase
[BindProperty(SupportsGet = true)]
public string BlogPostSlug { get; set; }
public BlogPostPublicDto BlogPost { get; private set; }
public BlogPostViewModel ViewModel { get; private set; }
public BlogFeatureDto CommentsFeature { get; private set; }
@ -24,48 +26,61 @@ public class BlogPostModel : CmsKitPublicPageModelBase
public BlogFeatureDto RatingsFeature { get; private set; }
public BlogFeatureDto TagsFeature { get; private set; }
public BlogFeatureDto BlogPostScrollIndexFeature { get; private set; }
protected IBlogPostPublicAppService BlogPostPublicAppService { get; }
protected IBlogFeatureAppService BlogFeatureAppService { get; }
protected ContentParser ContentParser { get; }
public BlogPostModel(
IBlogPostPublicAppService blogPostPublicAppService,
IBlogFeatureAppService blogFeaturePublicAppService)
IBlogFeatureAppService blogFeaturePublicAppService,
ContentParser contentParser)
{
BlogPostPublicAppService = blogPostPublicAppService;
BlogFeatureAppService = blogFeaturePublicAppService;
ContentParser = contentParser;
}
public virtual async Task OnGetAsync()
public virtual async Task<IActionResult> OnGetAsync()
{
BlogPost = await BlogPostPublicAppService.GetAsync(BlogSlug, BlogPostSlug);
var blogPostPublicDto = await BlogPostPublicAppService.GetAsync(BlogSlug, BlogPostSlug);
ViewModel = ObjectMapper.Map<BlogPostPublicDto, BlogPostViewModel>(blogPostPublicDto);
if (ViewModel == null)
{
return NotFound();
}
ViewModel.ContentFragments = await ContentParser.ParseAsync(blogPostPublicDto.Content);
if (GlobalFeatureManager.Instance.IsEnabled<CommentsFeature>())
{
CommentsFeature = await BlogFeatureAppService.GetOrDefaultAsync(BlogPost.BlogId, GlobalFeatures.CommentsFeature.Name);
CommentsFeature = await BlogFeatureAppService.GetOrDefaultAsync(ViewModel.BlogId, GlobalFeatures.CommentsFeature.Name);
}
if (GlobalFeatureManager.Instance.IsEnabled<ReactionsFeature>())
{
ReactionsFeature = await BlogFeatureAppService.GetOrDefaultAsync(BlogPost.BlogId, GlobalFeatures.ReactionsFeature.Name);
ReactionsFeature = await BlogFeatureAppService.GetOrDefaultAsync(ViewModel.BlogId, GlobalFeatures.ReactionsFeature.Name);
}
if (GlobalFeatureManager.Instance.IsEnabled<RatingsFeature>())
{
RatingsFeature = await BlogFeatureAppService.GetOrDefaultAsync(BlogPost.BlogId, GlobalFeatures.RatingsFeature.Name);
RatingsFeature = await BlogFeatureAppService.GetOrDefaultAsync(ViewModel.BlogId, GlobalFeatures.RatingsFeature.Name);
}
if (GlobalFeatureManager.Instance.IsEnabled<TagsFeature>())
{
TagsFeature = await BlogFeatureAppService.GetOrDefaultAsync(BlogPost.BlogId, GlobalFeatures.TagsFeature.Name);
TagsFeature = await BlogFeatureAppService.GetOrDefaultAsync(ViewModel.BlogId, GlobalFeatures.TagsFeature.Name);
}
if (GlobalFeatureManager.Instance.IsEnabled<BlogPostScrollIndexFeature>())
{
BlogPostScrollIndexFeature = await BlogFeatureAppService.GetOrDefaultAsync(BlogPost.BlogId, GlobalFeatures.BlogPostScrollIndexFeature.Name);
BlogPostScrollIndexFeature = await BlogFeatureAppService.GetOrDefaultAsync(ViewModel.BlogId, GlobalFeatures.BlogPostScrollIndexFeature.Name);
}
return Page();
}
}

@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using AutoMapper;
using Volo.Abp.Application.Dtos;
using Volo.CmsKit.Contents;
using Volo.CmsKit.Public.Blogs;
using Volo.CmsKit.Users;
namespace Volo.CmsKit.Public.Web.Pages.Public.CmsKit.Blogs;
[AutoMap(typeof(BlogPostPublicDto), ReverseMap = true)]
public class BlogPostViewModel : AuditedEntityDto<Guid>
{
public Guid BlogId { get; set; }
public string Title { get; set; }
public string Slug { get; set; }
public string ShortDescription { get; set; }
public string Content { get; set; }
public List<ContentFragment> ContentFragments { get; set; }
public Guid? CoverImageMediaId { get; set; }
public CmsUserDto Author { get; set; }
}

@ -18,19 +18,19 @@
<abp-style src="/Pages/Public/CmsKit/Pages/index.css" />
<style>
@Html.Raw(Model.PageDto.Style)
@Html.Raw(Model.ViewModel.Style)
</style>
}
@section scripts{
<script>
@Html.Raw(Model.PageDto.Script)
@Html.Raw(Model.ViewModel.Script)
</script>
}
<abp-card>
<abp-card-body>
@foreach (ContentFragment contentFragment in Model.PageDto.ContentFragments)
@foreach (ContentFragment contentFragment in Model.ViewModel.ContentFragments)
{
if (contentFragment.Type == ContentConsts.Markdown)
{
@ -40,7 +40,6 @@
{
@await Component.InvokeAsync(contentFragment.GetProperty<string>("Type"), contentFragment.ExtraProperties.ConvertToDynamicObject())
}
}
</abp-card-body>
</abp-card>

@ -1,6 +1,7 @@
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Volo.CmsKit.Public.Pages;
using Volo.CmsKit.Web.Contents;
using Volo.CmsKit.Web.Pages;
namespace Volo.CmsKit.Public.Web.Pages.Public.CmsKit.Pages;
@ -12,21 +13,26 @@ public class IndexModel : CommonPageModel
protected IPagePublicAppService PagePublicAppService { get; }
public PageDto PageDto{ get; private set; }
protected ContentParser ContentParser { get; }
public IndexModel(IPagePublicAppService pagePublicAppService)
public PageViewModel ViewModel { get; private set; }
public IndexModel(IPagePublicAppService pagePublicAppService, ContentParser contentParser)
{
PagePublicAppService = pagePublicAppService;
ContentParser = contentParser;
}
public async Task<IActionResult> OnGetAsync()
public virtual async Task<IActionResult> OnGetAsync()
{
PageDto = await PagePublicAppService.FindBySlugAsync(Slug);
if (PageDto == null)
var pageDto = await PagePublicAppService.FindBySlugAsync(Slug);
ViewModel = ObjectMapper.Map<PageDto, PageViewModel>(pageDto);
if (ViewModel == null)
{
return NotFound();
}
ViewModel.ContentFragments = await ContentParser.ParseAsync(pageDto.Content);
return Page();
}

@ -1,9 +1,12 @@
using System;
using System.Collections.Generic;
using AutoMapper;
using Volo.CmsKit.Contents;
using Volo.CmsKit.Public.Pages;
namespace Volo.CmsKit.Public.Web.Pages.Public.CmsKit.Pages;
[AutoMap(typeof(PageDto), ReverseMap = true)]
public class PageViewModel
{
public Guid Id { get; set; }
@ -11,4 +14,8 @@ public class PageViewModel
public string Title { get; set; }
public List<ContentFragment> ContentFragments { get; set; }
public string Script { get; set; }
public string Style { get; set; }
}
Loading…
Cancel
Save