https://github.com/wiredviews/xperience-html-tag-page-builder-components
A collection of ASP.NET Core components for optimizing the rendering and loading of script, style, and image assets on Kentico Xperience 13.0 sites
https://github.com/wiredviews/xperience-html-tag-page-builder-components
Last synced: 5 months ago
JSON representation
A collection of ASP.NET Core components for optimizing the rendering and loading of script, style, and image assets on Kentico Xperience 13.0 sites
- Host: GitHub
- URL: https://github.com/wiredviews/xperience-html-tag-page-builder-components
- Owner: wiredviews
- License: mit
- Created: 2022-06-11T15:08:55.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-06-11T18:05:38.000Z (about 4 years ago)
- Last Synced: 2025-10-07T10:31:09.109Z (9 months ago)
- Language: C#
- Size: 48.8 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Xperience HTML Tag Page Builder Components
[](https://github.com/wiredviews/xperience-html-tag-page-builder-components/actions/workflows/ci.yml)
[](https://github.com/wiredviews/xperience-html-tag-page-builder-components/actions/workflows/publish.yml)
[](https://www.nuget.org/packages/XperienceCommunity.HTMLTagPageBuilderComponents)
A collection of ASP.NET Core components for optimizing the rendering and loading of script, style, and image assets on Kentico Xperience 13.0 sites
## Dependencies
This package is compatible with ASP.NET Core 6.0+ applications or libraries integrated with Kentico Xperience 13.0.
## How to Integrate?
1. Install the NuGet package in your ASP.NET Core project (or class library)
```bash
dotnet add package XperienceCommunity.HTMLTagPageBuilderComponents
```
2. Create an implementation of `IHTMLTagsRetriever` which should use `IPageRetriever` to get either global HTML tag page content or a specific HTML tag page's content to display on the site:
```csharp
public class : MyHTMLTagsRetreiver : IHTMLTagsRetriever
{
private readonly IPageRetriever pageRetriever;
public MyHTMLTagsRetriever(IPageRetriever pageRetriever) => this.pageRetriever = pageRetriever;
public async Task RetrieveGlobalTags(CancellationToken cancellationToken = default)
{
var pages = await pageRetriever.RetrieveAsync();
if (!pages.Any())
{
throw new Exception("...");
}
return pages.Select(p => new GlobalTags(...)).Single();
}
public async Task RetrieveAdvancedTag(Guid nodeGUID, CancellationToken cancellationToken = default)
{
var pages = await pageRetriever.RetrieveAsync(q => q.WhereEquals(nameof(TreeNode.NodeGUID), nodeGUID));
if (!pages.Any())
{
throw new Exception("...");
}
return pages.Select(p => new AdvancedHTMLTag(...)).Single();
}
}
```
3. Call the `IServiceCollection` extension to register all the library's services:
```csharp
services.AddHTMLTagPageBuilderComponents();
```
4. Add the HTML Tag View Components to the main areas of your Layout:
```html