Posts

Stop Opening Every Asset: Quick Metadata Popovers in Sitecore Content Hub

Image
Hello everyone, welcome back to another blog post! While working on a recent requirement, I explored an interesting concept and realized I could build the functionality in a much more generic way—allowing anyone to easily adapt and reuse it in their own projects with just a few minor tweaks. Every Content Hub search result shows a thumbnail and a title, but users usually need a couple more facts before they act on an item: its type, a tag, a fiscal year. Opening each item to check is slow. In this post I build a reusable external component that adds a small ⓘ button to every search result row. The button opens a popover showing exactly the fields you configure. There is no hard-coded schema and no rebuild per use case, because everything is driven by JSON config. I also cover the starter template behind it. It's a Vite + React + TypeScript setup that builds each component into one self-contained file and serves it to Content Hub over trusted HTTPS from your own machine. Th...

Eight Ways In: A Content Hub Reading Reference

Hello everyone, and welcome to another blog! In this blog, we’ll explore how to consume Sitecore Content Hub data using the Content Hub WebClient SDK, HTTP raw endpoints, and search queries, with a specific focus on scenarios involving external components. Every field you'll meet in Content Hub is one of a handful of shapes — a plain property, an option list, a taxonomy entity, a relation, a count, a search box. Each shape has one or two read methods that actually fit it. Here's how to spot which one you're looking at before you write a query. SDK @sitecore/sc-contenthub-webclient-sdk The SDK gives you several doors into the same data — a typed query engine, a per-entity property/relation loader, an option-list reader, and a raw REST layer underneath all of it. None of them is wrong, exactly, but each is a good fit for exactly one shape of data and an awkward fit for the rest. The fastest way to pick correctly is to look at what you're tryin...

Sitecore Content Hub Bulk Read SDK vs. GraphQL: Performance and Use Cases

Sooner or later every Sitecore Content Hub project gets a request like this: "Can you give us a spreadsheet of every usage right, with its status and expiry dates?" or "Find all assets whose rights expired more than six months ago." In other words, you have to read every entity of one definition . That can be tens of thousands of records, and you need them reliably, without duplicates or gaps. I recently built exactly this for the M.DRM.RightsProfile definition, which holds usage rights. There are two very different APIs for it, and the SDK itself offers two ways to page: The Content Hub Web SDK ( Stylelabs.M.Sdk.WebClient ), using either SearchAfterQuery or the Entity Scroller . Sitecore Experience Edge GraphQL , which can return up to 1,000 records per call . I put both behind a single switch in the same helper, so they write an identical CSV and I could time them against each other. This post covers how each approach works, the traps I hit...

Update One Field Not the Whole Entity: Safe Backfills in Sitecore Content Hub

Image
Hello everyone, and welcome to another blog post! In this blog, we’ll explore an important aspect of saving entities in Sitecore Content Hub, particularly during large-scale data update operations such as **backfill activities**, which are a common requirement in Content Hub implementations. Backfilling a Single Field in Sitecore Content Hub Without Fighting Required Fields If you've ever run a backfill in Sitecore Content Hub — "populate this one new property across tens of thousands of entities" — you've probably hit the wall this post is about. The task sounds trivial: load the entity, set the value, save. But the moment your entity definition has required members , and especially when some of those required members carry default values you were never told about , the "obvious" save path starts throwing errors, and you're left wondering why updating one harmless field is so hard. This is the approach that actually works: skip SaveAsync entirely ...