diff --git a/.testing/Umbraco_10/Properties/launchSettings.json b/.testing/Umbraco_10/Properties/launchSettings.json
index 4e783dc..56e0c9a 100644
--- a/.testing/Umbraco_10/Properties/launchSettings.json
+++ b/.testing/Umbraco_10/Properties/launchSettings.json
@@ -18,12 +18,12 @@
},
"Umbraco.Web.UI": {
"commandName": "Project",
- "dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "https://localhost:44390;http://localhost:37643",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
- }
+ },
+ "dotnetRunMessages": true
}
}
-}
+}
\ No newline at end of file
diff --git a/.testing/Umbraco_10/Umbraco_10.csproj b/.testing/Umbraco_10/Umbraco_10.csproj
index 0309398..b8b1d1f 100644
--- a/.testing/Umbraco_10/Umbraco_10.csproj
+++ b/.testing/Umbraco_10/Umbraco_10.csproj
@@ -29,4 +29,5 @@
false
false
+
diff --git a/.testing/Umbraco_12/Properties/launchSettings.json b/.testing/Umbraco_12/Properties/launchSettings.json
index c766e26..87c5122 100644
--- a/.testing/Umbraco_12/Properties/launchSettings.json
+++ b/.testing/Umbraco_12/Properties/launchSettings.json
@@ -18,12 +18,12 @@
},
"Umbraco.Web.UI": {
"commandName": "Project",
- "dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "https://localhost:44308;http://localhost:39618",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
- }
+ },
+ "dotnetRunMessages": true
}
}
-}
+}
\ No newline at end of file
diff --git a/.testing/Umbraco_12/Umbraco_12.csproj b/.testing/Umbraco_12/Umbraco_12.csproj
index 3ba8532..b8725e9 100644
--- a/.testing/Umbraco_12/Umbraco_12.csproj
+++ b/.testing/Umbraco_12/Umbraco_12.csproj
@@ -26,4 +26,5 @@
false
+
diff --git a/.testing/readme.md b/.testing/readme.md
index e69de29..12fb5b1 100644
--- a/.testing/readme.md
+++ b/.testing/readme.md
@@ -0,0 +1,11 @@
+# Setup a Test Umbraco Instance
+
+1. Install a _specific version_ of `Umbraco.Templates`
+2. Scaffold a new project based on these templates.
+
+> The example below references the current LTS version of Umbraco, version 10.
+
+```
+dotnet new install Umbraco.Templates::10.0.0
+dotnet new umbraco --name Umbraco_10
+```
\ No newline at end of file
diff --git a/Humble.Umbraco.Packages/Humble.RCL/Humble.RCL.csproj b/Humble.Umbraco.Packages/Humble.RCL/Humble.RCL.csproj
deleted file mode 100644
index 360eea8..0000000
--- a/Humble.Umbraco.Packages/Humble.RCL/Humble.RCL.csproj
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
- net6.0
- enable
- enable
- /
-
-
-
- Humble.RCL
- Humble.RCL
- Humble.RCL
- ...
- umbraco plugin package
-
-
-
-
-
-
-
-
-
- Never
-
-
-
diff --git a/Humble.Umbraco.Packages/Humble.RCL/readme.md b/Humble.Umbraco.Packages/Humble.RCL/readme.md
new file mode 100644
index 0000000..1fd0cd7
--- /dev/null
+++ b/Humble.Umbraco.Packages/Humble.RCL/readme.md
@@ -0,0 +1,11 @@
+By default, static assets are made available in the following path:
+
+```
+/_content/_NAMESPACE_/_PATH_/_FILE_
+```
+
+By setting the following value in your `.csproj`, you can ensure that the path above matches the path in your project:
+
+```
+/
+```
\ No newline at end of file
diff --git a/Humble.Umbraco.Packages/Humble.RCL/wwwroot/App_Plugins/Humble/package.manifest b/Humble.Umbraco.Packages/Humble.RCL/wwwroot/App_Plugins/Humble/package.manifest
deleted file mode 100644
index 1c11bab..0000000
--- a/Humble.Umbraco.Packages/Humble.RCL/wwwroot/App_Plugins/Humble/package.manifest
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "id": "Humble.RCL",
- "name": "Humble.RCL",
- "allowPackageTelemetry": true
-}
diff --git a/Humble.Umbraco.Packages/Humble.RCL/wwwroot/App_Plugins/Humble/test.cshtml b/Humble.Umbraco.Packages/Humble.RCL/wwwroot/App_Plugins/Humble/test.cshtml
deleted file mode 100644
index 4d7438b..0000000
--- a/Humble.Umbraco.Packages/Humble.RCL/wwwroot/App_Plugins/Humble/test.cshtml
+++ /dev/null
@@ -1,4 +0,0 @@
-
I'm a test page, from an RCL Library
-
- You can overwrite me by creating a "test.cshtml" anywhere in your ~/Views
folder.
-
\ No newline at end of file
diff --git a/Humble.Umbraco.Packages/Humble.RCL/wwwroot/test.js b/Humble.Umbraco.Packages/Humble.RCL/wwwroot/test.js
new file mode 100644
index 0000000..a5946d9
--- /dev/null
+++ b/Humble.Umbraco.Packages/Humble.RCL/wwwroot/test.js
@@ -0,0 +1 @@
+alert("RCL is working!");
\ No newline at end of file
diff --git a/Humble.Umbraco.Packages/Humble.Umbraco.UI/TagHelpers/HelloWorldTagHelper.cs b/Humble.Umbraco.Packages/Humble.Umbraco.UI/TagHelpers/HelloWorldTagHelper.cs
new file mode 100644
index 0000000..f2a334c
--- /dev/null
+++ b/Humble.Umbraco.Packages/Humble.Umbraco.UI/TagHelpers/HelloWorldTagHelper.cs
@@ -0,0 +1,12 @@
+using Microsoft.AspNetCore.Razor.TagHelpers;
+
+namespace Humble.Umbraco.UI.TagHelpers;
+
+public class HelloWorldTagHelper : TagHelper
+{
+ public override void Process(TagHelperContext context, TagHelperOutput output)
+ {
+ output.TagName = "p";
+ output.Content.SetContent("Hello, World!");
+ }
+}
\ No newline at end of file
diff --git a/Humble.Umbraco.Packages/Humble.Umbraco.UI/TagHelpers/ParserTagHelper.cs b/Humble.Umbraco.Packages/Humble.Umbraco.UI/TagHelpers/ParserTagHelper.cs
new file mode 100644
index 0000000..c0338a3
--- /dev/null
+++ b/Humble.Umbraco.Packages/Humble.Umbraco.UI/TagHelpers/ParserTagHelper.cs
@@ -0,0 +1,68 @@
+using System.Reflection;
+using System.Text.RegularExpressions;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Razor.TagHelpers;
+using Microsoft.Extensions.DependencyInjection;
+using Umbraco.Cms.Core.Models.PublishedContent;
+using Umbraco.Cms.Core.Strings;
+using Umbraco.Cms.Core.Web;
+using Umbraco.Cms.Web.Common;
+using Umbraco.Extensions;
+
+namespace Humble.Umbraco.UI.TagHelpers;
+
+[HtmlTargetElement("humble-parser", TagStructure = TagStructure.NormalOrSelfClosing)]
+public class HumbleParserTagHelper : TagHelper
+{
+ private readonly IUmbracoContextAccessor _umbracoContextAccessor;
+ private readonly UmbracoHelper _umbracoHelper;
+
+ public HumbleParserTagHelper(IUmbracoContextAccessor umbracoContextAccessor, UmbracoHelper umbracoHelper)
+ {
+ _umbracoContextAccessor = umbracoContextAccessor;
+ _umbracoHelper = umbracoHelper;
+ }
+
+ public IHtmlEncodedString Content { get; set; }
+
+ public override void Process(TagHelperContext context, TagHelperOutput output)
+ {
+ output.TagName = null;
+ var umbracoContext = _umbracoContextAccessor.GetRequiredUmbracoContext();
+ var contentService = umbracoContext.Content;
+
+ if (contentService == null)
+ {
+ return;
+ }
+
+ IPublishedContent content = _umbracoHelper.AssignedContentItem; // Set this based on your requirements
+
+ var replacePattern = new Regex(@"{{([a-zA-Z]+)}}", RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace);
+ var newContents = Content.ToString();
+
+ var matches = replacePattern.Matches(newContents);
+
+ foreach (Match match in matches)
+ {
+ string key = match.Groups[1].Value;
+ var typeProperty = content.GetType().GetProperty(key, BindingFlags.IgnoreCase | BindingFlags.Instance | BindingFlags.Public);
+
+ if (typeProperty != null)
+ {
+ newContents = newContents.Replace(match.Value, typeProperty.GetValue(content, null).ToString());
+ continue;
+ }
+
+ var contentProperty = content.GetProperty(key);
+ if (contentProperty == null) continue;
+
+ var value = contentProperty.GetValue();
+ if (value == null) continue;
+
+ newContents = newContents.Replace(match.Value, value.ToString());
+ }
+
+ output.Content.SetHtmlContent(newContents);
+ }
+}
\ No newline at end of file
diff --git a/Humble.Umbraco.Packages/Humble.Umbraco.UI/TagHelpers/ParserTagHelper.md b/Humble.Umbraco.Packages/Humble.Umbraco.UI/TagHelpers/ParserTagHelper.md
new file mode 100644
index 0000000..67bb99e
--- /dev/null
+++ b/Humble.Umbraco.Packages/Humble.Umbraco.UI/TagHelpers/ParserTagHelper.md
@@ -0,0 +1,4 @@
+```
+
+```
\ No newline at end of file
diff --git a/Humble.Umbraco.Packages/Humble.Umbraco.UI/TagHelpers/PictureTagHelper.cs b/Humble.Umbraco.Packages/Humble.Umbraco.UI/TagHelpers/PictureTagHelper.cs
new file mode 100644
index 0000000..7fb4d99
--- /dev/null
+++ b/Humble.Umbraco.Packages/Humble.Umbraco.UI/TagHelpers/PictureTagHelper.cs
@@ -0,0 +1,38 @@
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Razor.TagHelpers;
+using Umbraco.Cms.Core.Models;
+using Umbraco.Extensions;
+
+namespace Humble.Umbraco.UI.TagHelpers;
+
+[HtmlTargetElement("humble-picture", TagStructure = TagStructure.NormalOrSelfClosing)]
+public class PictureTagHelper : TagHelper
+{
+ public List MediaWithCropsList { get; set; }
+
+ public override async Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
+ {
+ var content = await output.GetChildContentAsync();
+ var mediaSources = new List();
+
+ foreach (var mediaWithCrops in MediaWithCropsList)
+ {
+ // Determine which breakpoint to use based on the width of the image
+ string breakpoint = "s";
+
+ // Get the URL for the specific breakpoint from the LocalCrops
+ var cropData = mediaWithCrops.LocalCrops.GetCrop(breakpoint);
+ var mediaUrl = mediaWithCrops.Url();
+
+ // Create a