@sr["With great power comes great responsibility. This page is intended for use by developers, for adding javscript and css into the page. Use this page only if you understand what you are doing."]
-
+
+
+ @sr["With great power comes great responsibility. This page is intended for use by developers, for adding javscript and css into the page. Use this page only if you understand what you are doing."]
+
+
+
@sr["Raw JavaScript"]
+
diff --git a/src/cloudscribe.SimpleContent.CompiledViews.Bootstrap5/Views/Page/EditWithTemplateScriptsPartial.cshtml b/src/cloudscribe.SimpleContent.CompiledViews.Bootstrap5/Views/Page/EditWithTemplateScriptsPartial.cshtml
index 820168fe..d69fd206 100644
--- a/src/cloudscribe.SimpleContent.CompiledViews.Bootstrap5/Views/Page/EditWithTemplateScriptsPartial.cshtml
+++ b/src/cloudscribe.SimpleContent.CompiledViews.Bootstrap5/Views/Page/EditWithTemplateScriptsPartial.cshtml
@@ -33,4 +33,5 @@
}
+
\ No newline at end of file
diff --git a/src/cloudscribe.SimpleContent.CompiledViews.Bootstrap5/Views/Page/PageScriptsPartial.cshtml b/src/cloudscribe.SimpleContent.CompiledViews.Bootstrap5/Views/Page/PageScriptsPartial.cshtml
index a348ffae..fe751921 100644
--- a/src/cloudscribe.SimpleContent.CompiledViews.Bootstrap5/Views/Page/PageScriptsPartial.cshtml
+++ b/src/cloudscribe.SimpleContent.CompiledViews.Bootstrap5/Views/Page/PageScriptsPartial.cshtml
@@ -1,3 +1,8 @@
@model cloudscribe.SimpleContent.Web.ViewModels.PageViewModel
+
+@if (Model.CurrentPage?.Script != null && !string.IsNullOrWhiteSpace(Model.CurrentPage.Script))
+{
+
+}
\ No newline at end of file
diff --git a/src/cloudscribe.SimpleContent.Models/Blog/Post.cs b/src/cloudscribe.SimpleContent.Models/Blog/Post.cs
index f79bfca0..5374bd3f 100644
--- a/src/cloudscribe.SimpleContent.Models/Blog/Post.cs
+++ b/src/cloudscribe.SimpleContent.Models/Blog/Post.cs
@@ -96,6 +96,6 @@ public static Post FromIPost(IPost post)
post.CopyTo(p);
return p;
}
-
+ public string Script { get; set; }
}
}
diff --git a/src/cloudscribe.SimpleContent.Models/IContentItem.cs b/src/cloudscribe.SimpleContent.Models/IContentItem.cs
index 1119f5f4..3a3c31e7 100644
--- a/src/cloudscribe.SimpleContent.Models/IContentItem.cs
+++ b/src/cloudscribe.SimpleContent.Models/IContentItem.cs
@@ -11,6 +11,6 @@ public interface IContentItem
string Content { get; set; }
DateTime? PubDate { get; set; }
string MetaDescription { get; set; }
-
+ string Script { get; set; }
}
}
diff --git a/src/cloudscribe.SimpleContent.Models/ModelExtensions.cs b/src/cloudscribe.SimpleContent.Models/ModelExtensions.cs
index 0962ab93..7e753269 100644
--- a/src/cloudscribe.SimpleContent.Models/ModelExtensions.cs
+++ b/src/cloudscribe.SimpleContent.Models/ModelExtensions.cs
@@ -310,6 +310,7 @@ public static void CopyTo(this IPage input, IPage target)
target.ShowCreatedDate = input.ShowCreatedDate;
target.ShowLastModifiedBy = input.ShowLastModifiedBy;
target.ShowLastModifiedDate = input.ShowLastModifiedDate;
+ target.Script = input.Script;
}
///
diff --git a/src/cloudscribe.SimpleContent.Models/Page/IPage.cs b/src/cloudscribe.SimpleContent.Models/Page/IPage.cs
index 78ce9c2c..72a7f8a7 100644
--- a/src/cloudscribe.SimpleContent.Models/Page/IPage.cs
+++ b/src/cloudscribe.SimpleContent.Models/Page/IPage.cs
@@ -68,5 +68,6 @@ public interface IPage : IContentItem
public bool? ShowCreatedDate { get; set; }
public bool? ShowLastModifiedBy { get; set; }
public bool? ShowLastModifiedDate { get; set; }
+ public string? Script { get; set; }
}
}
\ No newline at end of file
diff --git a/src/cloudscribe.SimpleContent.Models/Page/Page.cs b/src/cloudscribe.SimpleContent.Models/Page/Page.cs
index e0635151..7e252eee 100644
--- a/src/cloudscribe.SimpleContent.Models/Page/Page.cs
+++ b/src/cloudscribe.SimpleContent.Models/Page/Page.cs
@@ -101,5 +101,6 @@ public static Page FromIPage(IPage page)
public bool? ShowCreatedDate { get; set; }
public bool? ShowLastModifiedBy { get; set; }
public bool? ShowLastModifiedDate { get; set; }
+ public string? Script { get; set; }
}
}
diff --git a/src/cloudscribe.SimpleContent.Models/Page/PageResource.cs b/src/cloudscribe.SimpleContent.Models/Page/PageResource.cs
index 84f26443..f862b1af 100644
--- a/src/cloudscribe.SimpleContent.Models/Page/PageResource.cs
+++ b/src/cloudscribe.SimpleContent.Models/Page/PageResource.cs
@@ -31,7 +31,6 @@ public PageResource()
public string Id { get; set; }
public string ContentId { get; set; }
public int Sort { get; set; } = 1;
-
public string Type { get; set; }
public string Environment { get; set; }
public string Url { get; set; }
diff --git a/src/cloudscribe.SimpleContent.Storage.EFCore.Common/Models/PageEntity.cs b/src/cloudscribe.SimpleContent.Storage.EFCore.Common/Models/PageEntity.cs
index bdc732b1..02cc3bb3 100644
--- a/src/cloudscribe.SimpleContent.Storage.EFCore.Common/Models/PageEntity.cs
+++ b/src/cloudscribe.SimpleContent.Storage.EFCore.Common/Models/PageEntity.cs
@@ -233,5 +233,6 @@ public static PageEntity FromIPage(IPage page)
public bool? ShowCreatedDate { get; set; }
public bool? ShowLastModifiedBy { get; set; }
public bool? ShowLastModifiedDate { get; set; }
+ public string Script { get; set; }
}
}
diff --git a/src/cloudscribe.SimpleContent.Storage.EFCore.Common/Models/PageResourceEntity.cs b/src/cloudscribe.SimpleContent.Storage.EFCore.Common/Models/PageResourceEntity.cs
index 6de77246..bf7b4907 100644
--- a/src/cloudscribe.SimpleContent.Storage.EFCore.Common/Models/PageResourceEntity.cs
+++ b/src/cloudscribe.SimpleContent.Storage.EFCore.Common/Models/PageResourceEntity.cs
@@ -24,9 +24,7 @@ public string PageEntityId
get { return pageEntityId; }
set { pageEntityId = value; }
}
-
public int Sort { get; set; } = 1;
-
public string Type { get; set; }
public string Environment { get; set; }
public string Url { get; set; }
diff --git a/src/cloudscribe.SimpleContent.Storage.EFCore.Common/Models/PostEntity.cs b/src/cloudscribe.SimpleContent.Storage.EFCore.Common/Models/PostEntity.cs
index 7e4bfbca..3feae1ad 100644
--- a/src/cloudscribe.SimpleContent.Storage.EFCore.Common/Models/PostEntity.cs
+++ b/src/cloudscribe.SimpleContent.Storage.EFCore.Common/Models/PostEntity.cs
@@ -136,6 +136,6 @@ public static PostEntity FromIPost(IPost post)
post.CopyTo(p);
return p;
}
-
+ public string Script { get; set; }
}
}
diff --git a/src/cloudscribe.SimpleContent.Storage.EFCore.MSSQL/Migrations/20250423093650_user-script-20250423.Designer.cs b/src/cloudscribe.SimpleContent.Storage.EFCore.MSSQL/Migrations/20250423093650_user-script-20250423.Designer.cs
new file mode 100644
index 00000000..2376b7a8
--- /dev/null
+++ b/src/cloudscribe.SimpleContent.Storage.EFCore.MSSQL/Migrations/20250423093650_user-script-20250423.Designer.cs
@@ -0,0 +1,1015 @@
+//
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using cloudscribe.SimpleContent.Storage.EFCore.MSSQL;
+
+#nullable disable
+
+namespace cloudscribe.SimpleContent.Storage.EFCore.MSSQL.Migrations
+{
+ [DbContext(typeof(SimpleContentDbContext))]
+ [Migration("20250423093650_user-script-20250423")]
+ partial class userscript20250423
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "8.0.0")
+ .HasAnnotation("Relational:MaxIdentifierLength", 128);
+
+ SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
+
+ modelBuilder.Entity("cloudscribe.SimpleContent.Models.ContentHistory", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasMaxLength(36)
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ArchivedBy")
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.Property("ArchivedUtc")
+ .HasColumnType("datetime2");
+
+ b.Property("Author")
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.Property("CategoriesCsv")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Content")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ContentId")
+ .IsRequired()
+ .HasMaxLength(36)
+ .HasColumnType("nvarchar(36)");
+
+ b.Property("ContentSource")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("ContentType")
+ .ValueGeneratedOnAdd()
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)")
+ .HasDefaultValue("html");
+
+ b.Property("CorrelationKey")
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.Property("CreatedByUser")
+ .HasMaxLength(100)
+ .HasColumnType("nvarchar(100)");
+
+ b.Property("CreatedUtc")
+ .HasColumnType("datetime2");
+
+ b.Property("DraftAuthor")
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.Property("DraftContent")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DraftPubDate")
+ .HasColumnType("datetime2");
+
+ b.Property("DraftSerializedModel")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("IsDraftHx")
+ .HasColumnType("bit");
+
+ b.Property("IsPublished")
+ .HasColumnType("bit");
+
+ b.Property("LastModified")
+ .HasColumnType("datetime2");
+
+ b.Property("LastModifiedByUser")
+ .HasMaxLength(100)
+ .HasColumnType("nvarchar(100)");
+
+ b.Property("MetaDescription")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("MetaHtml")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("MetaJson")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("PageOrder")
+ .HasColumnType("int");
+
+ b.Property("ParentId")
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.Property("ParentSlug")
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.Property("ProjectId")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("PubDate")
+ .HasColumnType("datetime2");
+
+ b.Property("SerializedModel")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Serializer")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("ShowCreatedBy")
+ .HasColumnType("bit");
+
+ b.Property("ShowCreatedDate")
+ .HasColumnType("bit");
+
+ b.Property("ShowLastModifiedBy")
+ .HasColumnType("bit");
+
+ b.Property("ShowLastModifiedDate")
+ .HasColumnType("bit");
+
+ b.Property("Slug")
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.Property("TeaserOverride")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("TemplateKey")
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.Property("Title")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.Property("ViewRoles")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("WasDeleted")
+ .HasColumnType("bit");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ContentId");
+
+ b.HasIndex("ContentSource");
+
+ b.HasIndex("CorrelationKey");
+
+ b.HasIndex("CreatedByUser");
+
+ b.HasIndex("LastModifiedByUser");
+
+ b.HasIndex("Title");
+
+ b.ToTable("cs_ContentHistory", null, t =>
+ {
+ t.HasTrigger("cs_ContentHistory_Trigger");
+ });
+
+ b.HasAnnotation("SqlServer:UseSqlOutputClause", false);
+ });
+
+ modelBuilder.Entity("cloudscribe.SimpleContent.Models.ProjectSettings", b =>
+ {
+ b.Property("Id")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("AboutContent")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("AboutHeading")
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.Property("AddBlogToPagesTree")
+ .HasColumnType("bit");
+
+ b.Property("BlogMenuLinksToNewestPost")
+ .HasColumnType("bit");
+
+ b.Property("BlogPageNavComponentVisibility")
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.Property("BlogPagePosition")
+ .HasColumnType("int");
+
+ b.Property("BlogPageText")
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.Property("CdnUrl")
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.Property("ChannelCategoriesCsv")
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.Property("ChannelRating")
+ .HasMaxLength(100)
+ .HasColumnType("nvarchar(100)");
+
+ b.Property("ChannelTimeToLive")
+ .HasColumnType("int");
+
+ b.Property("CommentNotificationEmail")
+ .HasMaxLength(100)
+ .HasColumnType("nvarchar(100)");
+
+ b.Property("CopyrightNotice")
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.Property("DaysToComment")
+ .HasColumnType("int");
+
+ b.Property("DefaultContentType")
+ .ValueGeneratedOnAdd()
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)")
+ .HasDefaultValue("html");
+
+ b.Property("DefaultFeedItems")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasDefaultValue(20);
+
+ b.Property("DefaultPageSlug")
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.Property("Description")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DisqusShortName")
+ .HasMaxLength(100)
+ .HasColumnType("nvarchar(100)");
+
+ b.Property("FacebookAppId")
+ .HasMaxLength(100)
+ .HasColumnType("nvarchar(100)");
+
+ b.Property("Image")
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.Property("IncludePubDateInPostUrls")
+ .HasColumnType("bit");
+
+ b.Property("LanguageCode")
+ .HasMaxLength(10)
+ .HasColumnType("nvarchar(10)");
+
+ b.Property("LocalMediaVirtualPath")
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.Property("ManagingEditorEmail")
+ .HasMaxLength(100)
+ .HasColumnType("nvarchar(100)");
+
+ b.Property("MaxFeedItems")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasDefaultValue(1000);
+
+ b.Property("ModerateComments")
+ .HasColumnType("bit");
+
+ b.Property("PostsPerPage")
+ .HasColumnType("int");
+
+ b.Property("PubDateFormat")
+ .HasMaxLength(75)
+ .HasColumnType("nvarchar(75)");
+
+ b.Property("Publisher")
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.Property("PublisherEntityType")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("PublisherLogoHeight")
+ .HasMaxLength(20)
+ .HasColumnType("nvarchar(20)");
+
+ b.Property("PublisherLogoUrl")
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.Property("PublisherLogoWidth")
+ .HasMaxLength(20)
+ .HasColumnType("nvarchar(20)");
+
+ b.Property("RecaptchaPrivateKey")
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.Property("RecaptchaPublicKey")
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.Property("RemoteFeedProcessorUseAgentFragment")
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.Property("RemoteFeedUrl")
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.Property("ShowAboutBox")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(true);
+
+ b.Property("ShowArchivedPosts")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(true);
+
+ b.Property("ShowBlogCategories")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(true);
+
+ b.Property("ShowCreatedBy")
+ .HasColumnType("bit");
+
+ b.Property("ShowCreatedDate")
+ .HasColumnType("bit");
+
+ b.Property("ShowFeaturedPostsOnDefaultPage")
+ .HasColumnType("bit");
+
+ b.Property("ShowLastModifiedBy")
+ .HasColumnType("bit");
+
+ b.Property("ShowLastModifiedDate")
+ .HasColumnType("bit");
+
+ b.Property("ShowRecentPostsOnDefaultPage")
+ .HasColumnType("bit");
+
+ b.Property("ShowRelatedPosts")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(true);
+
+ b.Property("ShowTitle")
+ .HasColumnType("bit");
+
+ b.Property("SiteName")
+ .HasMaxLength(200)
+ .HasColumnType("nvarchar(200)");
+
+ b.Property("TeaserMode")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("tinyint")
+ .HasDefaultValue((byte)0);
+
+ b.Property("TeaserTruncationLength")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasDefaultValue(20);
+
+ b.Property("TeaserTruncationMode")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("tinyint")
+ .HasDefaultValue((byte)0);
+
+ b.Property("TimeZoneId")
+ .HasMaxLength(100)
+ .HasColumnType("nvarchar(100)");
+
+ b.Property("Title")
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.Property("TwitterCreator")
+ .HasMaxLength(100)
+ .HasColumnType("nvarchar(100)");
+
+ b.Property("TwitterPublisher")
+ .HasMaxLength(100)
+ .HasColumnType("nvarchar(100)");
+
+ b.Property("UseDefaultPageAsRootNode")
+ .HasColumnType("bit");
+
+ b.Property("WebmasterEmail")
+ .HasMaxLength(100)
+ .HasColumnType("nvarchar(100)");
+
+ b.HasKey("Id");
+
+ b.ToTable("cs_ContentProject", null, t =>
+ {
+ t.HasTrigger("cs_ContentProject_Trigger");
+ });
+
+ b.HasAnnotation("SqlServer:UseSqlOutputClause", false);
+ });
+
+ modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageCategory", b =>
+ {
+ b.Property("Value")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("PageEntityId")
+ .HasMaxLength(36)
+ .HasColumnType("nvarchar(36)");
+
+ b.Property("ProjectId")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.HasKey("Value", "PageEntityId");
+
+ b.HasIndex("PageEntityId");
+
+ b.HasIndex("ProjectId");
+
+ b.HasIndex("Value");
+
+ b.ToTable("cs_PageCategory", null, t =>
+ {
+ t.HasTrigger("cs_PageCategory_Trigger");
+ });
+
+ b.HasAnnotation("SqlServer:UseSqlOutputClause", false);
+ });
+
+ modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageComment", b =>
+ {
+ b.Property("Id")
+ .HasMaxLength(36)
+ .HasColumnType("nvarchar(36)");
+
+ b.Property("Author")
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.Property("Content")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Email")
+ .HasMaxLength(100)
+ .HasColumnType("nvarchar(100)");
+
+ b.Property("Ip")
+ .HasMaxLength(100)
+ .HasColumnType("nvarchar(100)");
+
+ b.Property("IsAdmin")
+ .HasColumnType("bit");
+
+ b.Property("IsApproved")
+ .HasColumnType("bit");
+
+ b.Property("PageEntityId")
+ .HasMaxLength(36)
+ .HasColumnType("nvarchar(36)");
+
+ b.Property("ProjectId")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("PubDate")
+ .HasColumnType("datetime2");
+
+ b.Property("UserAgent")
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.Property("Website")
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("PageEntityId");
+
+ b.HasIndex("ProjectId");
+
+ b.ToTable("cs_PageComment", null, t =>
+ {
+ t.HasTrigger("cs_PageComment_Trigger");
+ });
+
+ b.HasAnnotation("SqlServer:UseSqlOutputClause", false);
+ });
+
+ modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageEntity", b =>
+ {
+ b.Property("Id")
+ .HasMaxLength(36)
+ .HasColumnType("nvarchar(36)");
+
+ b.Property("Author")
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.Property("CategoriesCsv")
+ .HasMaxLength(500)
+ .HasColumnType("nvarchar(500)");
+
+ b.Property("Content")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ContentType")
+ .ValueGeneratedOnAdd()
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)")
+ .HasDefaultValue("html");
+
+ b.Property("CorrelationKey")
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.Property("CreatedByUser")
+ .HasMaxLength(100)
+ .HasColumnType("nvarchar(100)");
+
+ b.Property("CreatedUtc")
+ .HasColumnType("datetime2");
+
+ b.Property("DisableEditor")
+ .HasColumnType("bit");
+
+ b.Property("DraftAuthor")
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.Property("DraftContent")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DraftPubDate")
+ .HasColumnType("datetime2");
+
+ b.Property("DraftSerializedModel")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ExternalUrl")
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.Property("IsPublished")
+ .HasColumnType("bit");
+
+ b.Property("LastModified")
+ .HasColumnType("datetime2");
+
+ b.Property("LastModifiedByUser")
+ .HasMaxLength(100)
+ .HasColumnType("nvarchar(100)");
+
+ b.Property("MenuFilters")
+ .HasMaxLength(500)
+ .HasColumnType("nvarchar(500)");
+
+ b.Property("MenuOnly")
+ .HasColumnType("bit");
+
+ b.Property("MetaDescription")
+ .HasMaxLength(500)
+ .HasColumnType("nvarchar(500)");
+
+ b.Property("MetaHtml")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("MetaJson")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("PageOrder")
+ .HasColumnType("int");
+
+ b.Property("ParentId")
+ .HasMaxLength(36)
+ .HasColumnType("nvarchar(36)");
+
+ b.Property("ParentSlug")
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.Property("ProjectId")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("PubDate")
+ .HasColumnType("datetime2");
+
+ b.Property("Script")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("SerializedModel")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Serializer")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("ShowCategories")
+ .HasColumnType("bit");
+
+ b.Property("ShowComments")
+ .HasColumnType("bit");
+
+ b.Property("ShowCreatedBy")
+ .HasColumnType("bit");
+
+ b.Property("ShowCreatedDate")
+ .HasColumnType("bit");
+
+ b.Property("ShowHeading")
+ .HasColumnType("bit");
+
+ b.Property("ShowLastModified")
+ .HasColumnType("bit");
+
+ b.Property("ShowLastModifiedBy")
+ .HasColumnType("bit");
+
+ b.Property("ShowLastModifiedDate")
+ .HasColumnType("bit");
+
+ b.Property("ShowMenu")
+ .HasColumnType("bit");
+
+ b.Property("ShowPubDate")
+ .HasColumnType("bit");
+
+ b.Property("Slug")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.Property("TemplateKey")
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.Property("Title")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.Property("ViewRoles")
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CorrelationKey");
+
+ b.HasIndex("ParentId");
+
+ b.HasIndex("ProjectId");
+
+ b.ToTable("cs_Page", null, t =>
+ {
+ t.HasTrigger("cs_Page_Trigger");
+ });
+
+ b.HasAnnotation("SqlServer:UseSqlOutputClause", false);
+ });
+
+ modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageResourceEntity", b =>
+ {
+ b.Property("Id")
+ .HasMaxLength(36)
+ .HasColumnType("nvarchar(36)");
+
+ b.Property("Environment")
+ .IsRequired()
+ .HasMaxLength(15)
+ .HasColumnType("nvarchar(15)");
+
+ b.Property("PageEntityId")
+ .HasMaxLength(36)
+ .HasColumnType("nvarchar(36)");
+
+ b.Property("Script")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Sort")
+ .HasColumnType("int");
+
+ b.Property("Type")
+ .IsRequired()
+ .HasMaxLength(10)
+ .HasColumnType("nvarchar(10)");
+
+ b.Property("Url")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("PageEntityId");
+
+ b.ToTable("cs_PageResource", null, t =>
+ {
+ t.HasTrigger("cs_PageResource_Trigger");
+ });
+
+ b.HasAnnotation("SqlServer:UseSqlOutputClause", false);
+ });
+
+ modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PostCategory", b =>
+ {
+ b.Property("Value")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("PostEntityId")
+ .HasMaxLength(36)
+ .HasColumnType("nvarchar(36)");
+
+ b.Property("ProjectId")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.HasKey("Value", "PostEntityId");
+
+ b.HasIndex("PostEntityId");
+
+ b.HasIndex("ProjectId");
+
+ b.HasIndex("Value");
+
+ b.ToTable("cs_PostCategory", null, t =>
+ {
+ t.HasTrigger("cs_PostCategory_Trigger");
+ });
+
+ b.HasAnnotation("SqlServer:UseSqlOutputClause", false);
+ });
+
+ modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PostComment", b =>
+ {
+ b.Property("Id")
+ .HasMaxLength(36)
+ .HasColumnType("nvarchar(36)");
+
+ b.Property("Author")
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.Property("Content")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Email")
+ .HasMaxLength(100)
+ .HasColumnType("nvarchar(100)");
+
+ b.Property("Ip")
+ .HasMaxLength(100)
+ .HasColumnType("nvarchar(100)");
+
+ b.Property("IsAdmin")
+ .HasColumnType("bit");
+
+ b.Property("IsApproved")
+ .HasColumnType("bit");
+
+ b.Property("PostEntityId")
+ .HasMaxLength(36)
+ .HasColumnType("nvarchar(36)");
+
+ b.Property("ProjectId")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("PubDate")
+ .HasColumnType("datetime2");
+
+ b.Property("UserAgent")
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.Property("Website")
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("PostEntityId");
+
+ b.HasIndex("ProjectId");
+
+ b.ToTable("cs_PostComment", null, t =>
+ {
+ t.HasTrigger("cs_PostComment_Trigger");
+ });
+
+ b.HasAnnotation("SqlServer:UseSqlOutputClause", false);
+ });
+
+ modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PostEntity", b =>
+ {
+ b.Property("Id")
+ .HasMaxLength(36)
+ .HasColumnType("nvarchar(36)");
+
+ b.Property("Author")
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.Property("AutoTeaser")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("BlogId")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("CategoriesCsv")
+ .HasMaxLength(500)
+ .HasColumnType("nvarchar(500)");
+
+ b.Property("Content")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ContentType")
+ .ValueGeneratedOnAdd()
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)")
+ .HasDefaultValue("html");
+
+ b.Property("CorrelationKey")
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.Property("CreatedByUser")
+ .HasMaxLength(100)
+ .HasColumnType("nvarchar(100)");
+
+ b.Property("CreatedUtc")
+ .HasColumnType("datetime2");
+
+ b.Property("DraftAuthor")
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.Property("DraftContent")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DraftPubDate")
+ .HasColumnType("datetime2");
+
+ b.Property("DraftSerializedModel")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ImageUrl")
+ .HasMaxLength(250)
+ .HasColumnType("nvarchar(250)");
+
+ b.Property("IsFeatured")
+ .HasColumnType("bit");
+
+ b.Property("IsPublished")
+ .HasColumnType("bit");
+
+ b.Property("LastModified")
+ .HasColumnType("datetime2");
+
+ b.Property("LastModifiedByUser")
+ .HasMaxLength(100)
+ .HasColumnType("nvarchar(100)");
+
+ b.Property("MetaDescription")
+ .HasMaxLength(500)
+ .HasColumnType("nvarchar(500)");
+
+ b.Property("MetaHtml")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("MetaJson")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("PubDate")
+ .HasColumnType("datetime2");
+
+ b.Property("Script")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("SerializedModel")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Serializer")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("ShowComments")
+ .HasColumnType("bit");
+
+ b.Property("Slug")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.Property("SuppressTeaser")
+ .HasColumnType("bit");
+
+ b.Property("TeaserOverride")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("TemplateKey")
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.Property("ThumbnailUrl")
+ .HasMaxLength(250)
+ .HasColumnType("nvarchar(250)");
+
+ b.Property("Title")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("BlogId");
+
+ b.HasIndex("CorrelationKey");
+
+ b.HasIndex("Slug");
+
+ b.ToTable("cs_Post", null, t =>
+ {
+ t.HasTrigger("cs_Post_Trigger");
+ });
+
+ b.HasAnnotation("SqlServer:UseSqlOutputClause", false);
+ });
+
+ modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageComment", b =>
+ {
+ b.HasOne("cloudscribe.SimpleContent.Storage.EFCore.Models.PageEntity", null)
+ .WithMany("PageComments")
+ .HasForeignKey("PageEntityId")
+ .OnDelete(DeleteBehavior.Cascade);
+ });
+
+ modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageResourceEntity", b =>
+ {
+ b.HasOne("cloudscribe.SimpleContent.Storage.EFCore.Models.PageEntity", null)
+ .WithMany("PageResources")
+ .HasForeignKey("PageEntityId")
+ .OnDelete(DeleteBehavior.Cascade);
+ });
+
+ modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PostComment", b =>
+ {
+ b.HasOne("cloudscribe.SimpleContent.Storage.EFCore.Models.PostEntity", null)
+ .WithMany("PostComments")
+ .HasForeignKey("PostEntityId");
+ });
+
+ modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageEntity", b =>
+ {
+ b.Navigation("PageComments");
+
+ b.Navigation("PageResources");
+ });
+
+ modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PostEntity", b =>
+ {
+ b.Navigation("PostComments");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/src/cloudscribe.SimpleContent.Storage.EFCore.MSSQL/Migrations/20250423093650_user-script-20250423.cs b/src/cloudscribe.SimpleContent.Storage.EFCore.MSSQL/Migrations/20250423093650_user-script-20250423.cs
new file mode 100644
index 00000000..30e4de2c
--- /dev/null
+++ b/src/cloudscribe.SimpleContent.Storage.EFCore.MSSQL/Migrations/20250423093650_user-script-20250423.cs
@@ -0,0 +1,48 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace cloudscribe.SimpleContent.Storage.EFCore.MSSQL.Migrations
+{
+ ///
+ public partial class userscript20250423 : Migration
+ {
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.AddColumn(
+ name: "Script",
+ table: "cs_Post",
+ type: "nvarchar(max)",
+ nullable: true);
+
+ migrationBuilder.AddColumn(
+ name: "Script",
+ table: "cs_PageResource",
+ type: "nvarchar(max)",
+ nullable: true);
+
+ migrationBuilder.AddColumn(
+ name: "Script",
+ table: "cs_Page",
+ type: "nvarchar(max)",
+ nullable: true);
+ }
+
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropColumn(
+ name: "Script",
+ table: "cs_Post");
+
+ migrationBuilder.DropColumn(
+ name: "Script",
+ table: "cs_PageResource");
+
+ migrationBuilder.DropColumn(
+ name: "Script",
+ table: "cs_Page");
+ }
+ }
+}
diff --git a/src/cloudscribe.SimpleContent.Storage.EFCore.MSSQL/Migrations/20250818152838_remove-pageresource-script.Designer.cs b/src/cloudscribe.SimpleContent.Storage.EFCore.MSSQL/Migrations/20250818152838_remove-pageresource-script.Designer.cs
new file mode 100644
index 00000000..397b9d9b
--- /dev/null
+++ b/src/cloudscribe.SimpleContent.Storage.EFCore.MSSQL/Migrations/20250818152838_remove-pageresource-script.Designer.cs
@@ -0,0 +1,1012 @@
+//
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using cloudscribe.SimpleContent.Storage.EFCore.MSSQL;
+
+#nullable disable
+
+namespace cloudscribe.SimpleContent.Storage.EFCore.MSSQL.Migrations
+{
+ [DbContext(typeof(SimpleContentDbContext))]
+ [Migration("20250818152838_remove-pageresource-script")]
+ partial class removepageresourcescript
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "8.0.0")
+ .HasAnnotation("Relational:MaxIdentifierLength", 128);
+
+ SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
+
+ modelBuilder.Entity("cloudscribe.SimpleContent.Models.ContentHistory", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasMaxLength(36)
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ArchivedBy")
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.Property("ArchivedUtc")
+ .HasColumnType("datetime2");
+
+ b.Property("Author")
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.Property("CategoriesCsv")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Content")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ContentId")
+ .IsRequired()
+ .HasMaxLength(36)
+ .HasColumnType("nvarchar(36)");
+
+ b.Property("ContentSource")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("ContentType")
+ .ValueGeneratedOnAdd()
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)")
+ .HasDefaultValue("html");
+
+ b.Property("CorrelationKey")
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.Property("CreatedByUser")
+ .HasMaxLength(100)
+ .HasColumnType("nvarchar(100)");
+
+ b.Property("CreatedUtc")
+ .HasColumnType("datetime2");
+
+ b.Property("DraftAuthor")
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.Property("DraftContent")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DraftPubDate")
+ .HasColumnType("datetime2");
+
+ b.Property("DraftSerializedModel")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("IsDraftHx")
+ .HasColumnType("bit");
+
+ b.Property("IsPublished")
+ .HasColumnType("bit");
+
+ b.Property("LastModified")
+ .HasColumnType("datetime2");
+
+ b.Property("LastModifiedByUser")
+ .HasMaxLength(100)
+ .HasColumnType("nvarchar(100)");
+
+ b.Property("MetaDescription")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("MetaHtml")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("MetaJson")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("PageOrder")
+ .HasColumnType("int");
+
+ b.Property("ParentId")
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.Property("ParentSlug")
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.Property("ProjectId")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("PubDate")
+ .HasColumnType("datetime2");
+
+ b.Property("SerializedModel")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Serializer")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("ShowCreatedBy")
+ .HasColumnType("bit");
+
+ b.Property("ShowCreatedDate")
+ .HasColumnType("bit");
+
+ b.Property("ShowLastModifiedBy")
+ .HasColumnType("bit");
+
+ b.Property("ShowLastModifiedDate")
+ .HasColumnType("bit");
+
+ b.Property