Umbraco Content Delivery API – Compose layout from multiple sources

One of the generic requirements for a website is to able easily create new pages without adding the common components (such as footer, header, navigation, search bar, etc.) to all newly created pages manually. My idea is to compose the final page layout response from multiple Umbraco items using Block Grid Editor. In my simple example I would like to add the header and footer components from a shared node to all pages. First, let’s build up the following item structure in Umbraco.

Continue reading “Umbraco Content Delivery API – Compose layout from multiple sources”

Umbraco Content Delivery API – Extending the API response with extra fields

The default Content Delivery API implementation and features can be found in different API endpoints. These controllers are using services, builders, etc. which are in a deeper a layer in the architecture and therefore controllers are re-using these functions. When I started to explore how to extend the default API responses, the most obvious extension points are the controllers – just inherit from the original controller and create a new one with the extension. In my opinion, this is not the best way because we need to touch all the controllers in this case and publish our own endpoints next to the original endpoints.

Continue reading “Umbraco Content Delivery API – Extending the API response with extra fields”

MAUI iOS Azure DevOps pipelines – Build & publish for App Store review

Lately, I was working on a .NET MAUI project, where I had to build different Azure DevOps pipelines for build and publish. There are some blogposts which are pretty helpful, but I ended up with a slightly different solution after knowledge gathering from the following posts:

Continue reading “MAUI iOS Azure DevOps pipelines – Build & publish for App Store review”

Tips and tricks for implementing a custom Sitecore SqlAuthorizationProvider

In this post I would like to share an example of implementing a custom SqlAuthorizationProvider for a Sitecore solution. First things first, you have to really consider using it for a large solution, it’s a customization for accessing items for users and roles and it’s a core functionality of Sitecore XM – this provider is called every time (if no cache hit), when anyone tries to get access to an item – with Experience Editor, Content Editor, Sitecore Item API, etc.).

Continue reading “Tips and tricks for implementing a custom Sitecore SqlAuthorizationProvider”

Web API JSON result schema testing with PowerShell and Git Hook

On a current project I am working on, we are implementing quite a few web APIs which is consumed by different frontend applications. The project is still in the beginning, but we thought it would be cool to ensure the API response JSON schema does not change accidentally by a developer. Therefore, I started to look into different solutions and just found the simplest one.

Continue reading “Web API JSON result schema testing with PowerShell and Git Hook”

Sitecore Headless – Next.js middleware issue with Experience Editor

A few days ago we have been hit by an Experience Editor issue with Next.js. It was already working and configured locally before. So the investigation began, where (Sitecore repository or Next.js repository) and which commit is causing the issue. On the Sitecore side we started to check with simple and low data components and in this case all was working as expected – Experience Editor rendered and worked. Alright, this means something is probably going on on the frontend side. I started to check which commit introduced the bug, by using git bisect – which I never heard of, until Bálint Csák talked about it.

Continue reading “Sitecore Headless – Next.js middleware issue with Experience Editor”

Sitecore Headless – How to reuse Layout Service serialization in custom API Controllers

On one of our current project we have a close deadline, therefore we need to simplify implementation and cut from the scope as much as possible to roll out the MVP with the full functionality but without Experience Editor support – as it’s not priority for now. We had a long discussion about this, the main reason of cutting scope is to keep the frontend simple as possible and focus on business logic functionality instead of editing experience. Therefore on the Sitecore side we are providing a few APIs for the frontend and not creating any layout, rendering and placeholders; only pure templates and content.

Continue reading “Sitecore Headless – How to reuse Layout Service serialization in custom API Controllers”

Sitecore Headless – Demystifying item serializers

In my previous posts I showed how you can extend the Layout Service and implement your own custom Contents Resolvers. Until now I simply wanted to serialize all non-standard Sitecore fields with its values. Although there could be a case where you need to include or exclude fields from the Layout Service response.

Continue reading “Sitecore Headless – Demystifying item serializers”

Sitecore Headless Next.js – Forwarding custom query parameters to Layout Service

A few weeks ago the following question came up by Robbert Hock on Sitecore Chat:

Contents Resolver question: with Context.HttpContext.Request.Params["item"] I can read the url of the item. But when for example we have a url like /news?page=1, how would I read the page querystring prop in a contents resolver? Somehow I can’t find it, since the request is like /sitecore/api/layout/render/default

Robbert Hock

This is a fair question, if you would like to process custom parameters in your custom Contents Resolver.

Continue reading “Sitecore Headless Next.js – Forwarding custom query parameters to Layout Service”