On one of my first Sitecore Headless project I got a requirement to implement a dynamic URL resolving to display product data from a different root of the Sitecore tree. If it would have been a traditional Sitecore solution I could implement a custom item resolver but in the headless world we need a different kind of mindset to solve problems like this.
Continue reading “Sitecore Headless – Wildcard item with datasource content resolver”Tag: Contents Resolver
Discovering Sitecore ASP .NET Core SDK – Datasource Item Children Resolver
TL;DR
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Discovering.Sitecore10.Models | |
{ | |
public class ChildrenBlockModel | |
{ | |
[SitecoreComponentField(Name = "items")] | |
public IEnumerable<ItemLinkField<ContentBlockModel>> Children { get; set; } | |
} | |
public class ContentBlockModel | |
{ | |
[SitecoreComponentField] | |
public TextField Title { get; set; } | |
} | |
} |
Longer interpretation
I wanted to play around a bit with different Contents Resolvers. The default resolvers are the following under the /sitecore/system/Modules/Layout Service/Rendering Contents Resolvers
item:
- Context Item Children Resolver
- Context Item Resolver
- Datasource Item Children Resolver
- Datasource Resolver
- Folder Filter Resolver
- Sitecore Forms Resolver