Posts

Custom Link Expansion in Sitecore: A Deep Dive into ExpandDynamicLinks in Link Provider

Hello everyone, This blog is continuation of my previous blog where we have seen how we can override the default link provider in XM Cloud. Now let's understand, how we can customize the behavior of links available withing Rich Text field. In Sitecore, managing links correctly is crucial—especially when dealing with Rich Text fields, emails, or content reuse across multiple sites. One of the key methods that helps with this is ExpandDynamicLinks, available in the LinkProvider class.Let’s explore what this method does, why it matters, and where you might use or override it in your Sitecore solution What is ExpandDynamicLinks? The ExpandDynamicLinks method is part of the Sitecore.Links.LinkProvider class. It's used to scan HTML or text content and replace Sitecore’s dynamic links (like ~/link.aspx?...) with friendly, human-readable URLs. Method Signature public virtual string ExpandDynamicLinks(string text, bool resolveSites); Parameters: text : A ...

Implementing Custom Link Provider in Sitecore XM Cloud

Image
Hello everyone, In this blog post we will see how we can override link provider class in Sitecore XM Cloud with a practical usecase. In Sitecore XM Cloud, the default link provider helps generate URLs based on the item's path and configured routing rules. However, in many real-world scenarios, marketers and content authors need more flexibility—like overriding the generated URL with a custom one defined at the content level. This blog walks through a custom link provider use case where a template includes a field such as "Override URL", allowing authors to specify a different link for a given page Let's walk through the scenario. Imagine you have a Search Page in Sitecore that includes an "Override URL" field. Now, create a sample content item—for example, a News Article page under a News folder. Whenever a component on this News Article page tries to generate a link to the main Search Page, we want to intercept this behavior. If the Search Page’s "O...

Moving Roles From Traditional XP To XM Cloud Using Sitecore Serialization

Hello everyone! In this blog post, we'll explore an essential concept in Sitecore — Sitecore Roles — which remains relevant across all platforms. Recently, I was working on a migration project where we needed to move Sitecore roles from a traditional XP solution to XM Cloud. Naturally, the first solution that came to mind was using Sitecore Serialization, as it's the go-to method for item migration. However, I quickly discovered that this approach doesn’t work as expected — roles cannot be serialized as IAR files. So, what now? After diving into the Sitecore documentation, I found the right approach — and I’m sharing it with you in this blog. Keep reading to find out how to successfully migrate roles to XM Cloud! The solution is that we need to module.json file which defined your roles only. The change will be that this should be deploy to your XM cloud instance as part of post deploy action mentioned in xmcloud.build.json file Step 1: Create a Foundation.Roles.module.jso...

Deploy and Test Local Feature Branches Like a Pro with Vercel CLI - XM Cloud and Vercel

Image
Hello everyone! In this blog, we'll explore how to use the Vercel CLI to deploy local branch changes to a Vercel Preview environment for quick verification and validation. Ideally, we have a proper CI/CD pipeline in place to build and deploy changes to the appropriate Vercel environment. However, there are situations—such as urgent bug fixes—where you might need to quickly validate your changes without waiting for the full pipeline. In such cases, you can use the Vercel CLI to deploy your local changes directly, typically to a Preview environment. Even if something goes wrong, Vercel makes it easy to roll back: you can simply redeploy a previous build from the dashboard and restore the environment within minutes Let's begin by setting up the Vercel CLI on your local machine. At this point, you should have already created a branch from your main or develop branch and pulled the latest commits. You've made your changes and tested them locally — now you're ready to deplo...

Automate RSS Feed to Sitecore XM Cloud: Logic App, Next.js API & Authoring API Integration

Image
Hello everyone, In this blog, we will see a pratical use case of reading RSS feed and creating the respective items in Sitecore XM Cloud. To accomplish the task, we will use Logic App, an API created in Next JS and lastly calling the Authoring API to execute mutation query for Item Creation in Sitecore. Let's divide the process into 2 parts: Logic App : This will mostly focus on fetching the feed from RSS, performing transformation, storing the result in array of json object and pushing the data to next js api endpoint. Next JS API Development : This will take care of calling the authoring api of XM Cloud instance and performing the create item mutation query on the recieved data from Logic App. Logic App Azure Logic App is a cloud-based service provided by Microsoft Azure that allows you to automate workflows and integrate applications, data, services, and systems without writing complex code. It enables you to create automated workflows visually through...

Create and Fetch Content From Sitecore Content Hub One using GraphQL and React

Image
Hello everyone, In this blog, we will see overview of Sitecore Content Hub One product its benefits, features etc. This blog will walkthrough below listed points. Overview Features Content Hub One Dashboard Creating Taxonomy Creating Content Type Uploading New Media Creating Content Items From Content Type Getting GraphQL Token Creating Sample React Application To Read the Content from Content Hub One Overview Sitecore Content Hub One is a powerful platform. It is designed to centralize and streamline content creation, management, and distribution across various channels.Focuses on delivering content via APIs, enabling seamless integration with various front-end frameworks.Hosted in the cloud, offering scalability, automatic updates, and reduced infrastructure management.Provides flexible APIs and SDKs for developers to integrate and build custom solutions efficiently. Features Headless Content Management : Allows content to be delivered via APIs to any front-end or platfor...