Posts

Showing posts from November, 2025

Debug Logging in Content SDK Apps — A Developer’s Guide

When building headless applications with Sitecore Content SDK, debugging becomes crucial especially as your component structure and data dependencies grow. Instead of writing console.log everywhere, the Content SDK provides a much cleaner and controlled approach to logging. The SDK uses the popular debug module for displaying debugging information. This allows developers to enable or disable logging dynamically using environment variables, making it easier to troubleshoot issues without modifying code. Debug logging is disabled by default, keeping terminal noise to a minimum during normal development. Once you need insights into what the Content SDK is doing—just turn it on! Enabling Debug Logs Use the DEBUG environment variable to control what logs are shown. When logging is enabled and you run your application, all triggered instances of debug() relevant to the namespaces you choose to include will be displayed in your console. To enable ...

Empower Your Components: Access Rendering Parameters via Sitecore Content SDK

When building components in Sitecore XM Cloud with the Content SDK, it’s common to let authors control certain visual aspects like background colours, layouts, or visibility options directly from the Page Builder. This is where Rendering Parameters come in. Rendering Parameters let you configure per-rendering options that are not tied to the data source item but instead linked to the component instance on a page. In this blog, let’s see how to: Create Rendering Parameters for styling options Attach them to a rendering Access and use them inside your component through the Content SDK API 1. Create a Rendering Parameters Template in XM Cloud In the Sitecore Content Editor , follow these steps: Navigate to /sitecore/templates/Project/DemoProject/Rendering Parameters Create a new template named CardList Rendering Parameters Add fields such as Styles (Single-Line Text or Droplist) Show Title (Checkbox) Save the template. This template defines the configuration fi...