diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/appsettings.json b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/appsettings.json
index 3c872decbe..fcf428bab3 100644
--- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/appsettings.json
+++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/appsettings.json
@@ -1,5 +1,5 @@
{
"ConnectionStrings": {
- "Default": "Server=(localdb)\\.\\MSSQLLocalDB;Database=CmsKit_Unified;Trusted_Connection=True"
+ "Default": "Server=(localdb)\\MSSQLLocalDB;Database=CmsKit_Unified;Trusted_Connection=True"
}
}
diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Contents/ContentParser.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Contents/ContentParser.cs
index b5716be9df..7fe9fe5b60 100644
--- a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Contents/ContentParser.cs
+++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Contents/ContentParser.cs
@@ -24,7 +24,7 @@ public class ContentParser : ITransientDependency
{
return Task.FromResult(new List
{
- new ContentFragment() { Type = Markdown }.SetProperty(Content, content),
+ new ContentFragment { Type = Markdown }.SetProperty(Content, content),
});
}
@@ -117,5 +117,4 @@ public class ContentParser : ITransientDependency
}
}
}
-
}
\ No newline at end of file
diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Contents/ContentWidgetConfig.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Contents/ContentWidgetConfig.cs
index 634b44fde2..8dc1f5d29f 100644
--- a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Contents/ContentWidgetConfig.cs
+++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Contents/ContentWidgetConfig.cs
@@ -5,9 +5,9 @@ namespace Volo.CmsKit.Contents;
public class ContentWidgetConfig
{
public string Name { get; }
- public Type ViewComponentType { get; set; }
+ public Type ViewComponentType { get; set; } //TODO: Remove this
- public ContentWidgetConfig(string name)
+ public ContentWidgetConfig(string name) //TODO: widgetName
{
Name = name;
}
diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Web/Contents/Helper.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Contents/Helper.cs
index 3d653e2351..d61c5f418a 100644
--- a/modules/cms-kit/src/Volo.CmsKit.Common.Web/Contents/Helper.cs
+++ b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Contents/Helper.cs
@@ -3,21 +3,19 @@ using System.Dynamic;
namespace Volo.CmsKit.Web.Contents;
-public static class Helper
+public static class DictionaryDynamicExtensions
{
- public static dynamic ConvertToDynamicObject(this Dictionary dict)
+ public static dynamic ConvertToDynamicObject(this Dictionary dict) //TODO: Move to AbpDictionaryExtensions
{
- var eo = new ExpandoObject();
- var eoColl = (ICollection>)eo;
+ var expandoObject = new ExpandoObject();
+ var eoColl = (ICollection>)expandoObject;
foreach (var kvp in dict)
{
eoColl.Add(kvp);
}
- dynamic eoDynamic = eo;
-
- return eoDynamic;
+ return expandoObject;
}
}
diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Blogs/BlogPost.cshtml b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Blogs/BlogPost.cshtml
index f104551911..d9211ed04c 100644
--- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Blogs/BlogPost.cshtml
+++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Blogs/BlogPost.cshtml
@@ -71,34 +71,34 @@
@Model.BlogPost.CreationTime
@foreach (var contentFragment in Model.BlogPost.ContentFragments)
- {
- if (contentFragment.Type == ContentConsts.Markdown)
- {
- @Html.Raw(await MarkdownRenderer.RenderAsync(contentFragment.GetProperty("Content")))
- }
- else if (contentFragment.Type == ContentConsts.Widget)
- {
- @await Component.InvokeAsync(contentFragment.GetProperty("Type"), contentFragment.ExtraProperties.ConvertToDynamicObject())
- }
- }
-
- @if (Model.BlogPost.LastModificationTime != null)
{
- @L["LastModification"].Value : @Model.BlogPost.LastModificationTime
+ if (contentFragment.Type == ContentConsts.Markdown)
+ {
+ @Html.Raw(await MarkdownRenderer.RenderAsync(contentFragment.GetProperty("Content")))
+ }
+ else if (contentFragment.Type == ContentConsts.Widget)
+ {
+ @await Component.InvokeAsync(contentFragment.GetProperty("Type"), contentFragment.ExtraProperties.ConvertToDynamicObject())
+ }
}
-
-
+
+ @if (Model.BlogPost.LastModificationTime != null)
+ {
+ @L["LastModification"].Value : @Model.BlogPost.LastModificationTime
+ }
+
+
- @if (GlobalFeatureManager.Instance.IsEnabled())
- {
- if (Model.TagsFeature?.IsEnabled == true)
+ @if (GlobalFeatureManager.Instance.IsEnabled())
{
- @await Component.InvokeAsync(typeof(TagViewComponent), new
- {
- entityType = Volo.CmsKit.Blogs.BlogPostConsts.EntityType,
- entityId = Model.BlogPost.Id.ToString(),
- urlFormat = $"/blogs/{Model.BlogSlug}?tagId={{TagId}}"
- })
+ if (Model.TagsFeature?.IsEnabled == true)
+ {
+ @await Component.InvokeAsync(typeof(TagViewComponent), new
+ {
+ entityType = Volo.CmsKit.Blogs.BlogPostConsts.EntityType,
+ entityId = Model.BlogPost.Id.ToString(),
+ urlFormat = $"/blogs/{Model.BlogSlug}?tagId={{TagId}}"
+ })
}
}