Posts

Optimizing Sitecore Branch Templates for Seamless Page Creation Without Datasource Path Modification

Hello everyone, in this blog, I’ll address a common challenge I’ve faced when using branch templates to create item structures. I noticed that when creating a branch structure and assigning a local datasource item, the datasource does not update automatically during item creation—the local datasource continues to reference the branch’s local items. In this blog, we’ll explore how to use a Sitecore pipeline to automatically update the datasource path. This solution will work with all version of Sitecore even if it is XMC, Headless or XP. I have tried this on XMC and it works absolutely fine Let's jump to solution. We will override AddFromTemplateProcessor and extend it to add our logic. Let's create AddFromBranchPresetProcessor which extends AddFromTemplateProcessor . Check below code. using Sitecore; using Sitecore.Data.Fields; using Sitecore.Data.Items; using Sitecore.Diagnostics; using Sitecore.Layouts; using Sitecore.Pipelines.ItemProvider.AddFromTemplate; us...

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...

SitecoreForU All Blog Links 2024

Sitecore XM Cloud XM Cloud and Azure Function Power Of Sitecore Module In XM Cloud Creating Component in XM Cloud using Component Builder Common Errors and Limitation in XM Cloud Development Migrate Content Between XM Cloud Environment Steps to Generate Access Token for Authoring API Endpoint in XM Cloud Understanding Search Query With Pagination Using GraphQL In XM Cloud Understanding Forms in Sitecore XM Cloud Sitecore Content Hub External Component In Sitecore Content Hub Using React Sitecore Content Hub One Create and Fetch Content From Sitecore Content Hub One using GraphQL and React Docker Facing Error With Solr Docker Service Not Healthy Switching From Docker Desktop to Docker CLI Sitecore SXA Anti-forgery token validation failed : The required anti-forgery cookie RequestVerificationToken is not present Implementing Custom 301 Redirect in Sitecore SXA Sitecore XP How to write Solr query using SolrNet Sitecore PowerShel...

Sitecore XM Cloud Form Integration with Azure Function as Webhook

Image
Hello everyone, In this blog, we will see, how Azure Function can be used with Sitecore Forms. Before starting, I would request everyone to read my previous blog on XM Cloud Form as I am not going to go deep with how to create forms in XM Cloud. Creating Azure Function : Will serve as our Webhook Creating and Integrating Form : XM Cloud Form Creating An Azure Function I will not explain how you can create Azure Function with Http Trigger. You can check this youtube link here . Also in reference section, I will provide the link how you can connect and deploy your changes to azure function using Visual Studio. Azure Function Code : Its just a starter code which Azure function by default. Creating XM Cloud Form and Integrating with Azure Function Step 1 : Create a form from Form Editor and once form us published, you can see the below view in preview state. Here you can edit your form too. But it always recommended to use a version of that form as whatever changes is done will ...

Switching Docker Desktop to Docker CLI in Easy Way

Hello everyone! In this blog, we'll explore an important aspect of Docker development with Sitecore. Most of us are familiar with using Docker Desktop for our development needs—it's user-friendly and offers a great interface for managing your Docker environment. However, the downside is that it's a licensed product. Let’s explore how Docker CLI can help us eliminate the licensing costs associated with Docker Desktop. We'll also look at how smoothly we can transition from using Docker Desktop to Docker CLI Step 1 : Uninstall Docker Desktop Step 2 : Install Docker Engine and CLI Uninstall Docker Desktop Make sure containers are stopped using following cmdlets: # Leave swarm mode (this will automatically stop and remove services and overlay networks) docker swarm leave --force # Stops all containers docker ps --quiet | ForEach-Object {docker stop $_} If you want to remove all containers, container images, networks, and volumes from your syste...

Automating Tag Update in Sitecore XM Cloud with PowerShell - A Use Case

Managing tags across different environments in a Sitecore setup can be a challenging task, especially when dealing with a large number of items and multiple folders. Automating the synchronization or updating of these tags can save time and reduce errors. In this blog post, we'll explore a practical use case of using Sitecore PowerShell Extensions (SPE) to automate the synchronization of tags between shared and global environments in a Sitecore instance Use Case Imagine you are managing a global website for a large corporation, such as ABC company. Your content is distributed across various regional sites, and each region uses a different set of tags stored in different folders.The respective page content are tagged with site specific tags. However, for consistency,The business ask you to ensure that tags from the shared environment should be used from now on. But there is catch while you make the changes. You need to make sure that all existing website content pages should be ta...

Power Of Sitecore Module In XM Cloud

Image
In this blog, we will explore how to automate the process of creating roles with appropriate permissions when working in a multilingual and multisite environment. As soon as we think about automation, PowerShell scripts are often the first tool that comes to mind. And you’re absolutely right—we will be using PowerShell scripts, but with a twist. We'll leverage Sitecore Modules to approach this differently, integrating the module into the scaffolding definition. This way, whenever a new site is created in XM Cloud, roles and permissions will be automatically set up. So let's quickly start. Before we move forward, I recommend reading my previous two blogs on role creation and assigning proper permissions, which are explained through a specific use case. We'll be using the same use case for our purposes here. Roles Creation Assign Permission We will divide the blog into 2 section. Creating the Scripts Creating the Module Creating the Scripts in Script Library We ...