Sitecore Headless – Wildcard item with datasource content resolver

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”

Discovering Sitecore ASP .NET Core SDK – Datasource Item Children Resolver

TL;DR

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
Continue reading “Discovering Sitecore ASP .NET Core SDK – Datasource Item Children Resolver”