Posts

Showing posts with the label Content Hub

Beyond Permissions: Customizing Asset Action Visibility in Sitecore Content Hub

Image
Hello everyone, Welcome to another blogpost. This blog will focus on Sitecore Content Hub development. We will discuss a use case that is highly relevant to practical development and reflects real-world business scenario. Let's get started without wasting any more time. Sitecore Content Hub provides a powerful security model through User Groups, Policies, Permissions, and Conditions. While these controls determine what users can do within the platform, they do not always control what users see in the user interface. Our blog will be exactly around this functionality. We received a requirement to restrict the download of certain assets from the Asset Search page. Specifically, any asset tagged with a particular taxonomy value should not be available for download by users. We explored using policies and permissions, particularly DRM rights in Content Hub, to address this requirement. However, none of the available configuration options provided a way to hide the Download button on...

Create Custom Definition In Sitecore Content Hub And Display Using OOTB component

Image
In Sitecore Content Hub, definitions are blueprints that structure and classify content entities like assets, contracts, and products. They let you customize metadata, add relationships, properties, and constraints, and either extend built-in definitions (e.g., M.Asset, M.Collection, M.Content ) or create new ones based on project needs. This guide explains how to create new definitions and when they’re required We will see, how one can create its own custom definition in content hub according to business need with an example. Let’s walk through a real-world example of creating a new definition for Marketing Campaigns. In this use case, we will build a custom definition that allows your organization to track marketing campaigns with attributes like CampaignName, StartDate, EndDate, Location, MarketingAssets and CampaignStatusActive Step 1: Creating New Definition Log in to your Sitecore Content Hub instance, navigate to Manage, then search for Schema. Click on Schema, and you’ll se...

Understanding External Component in Content Hub with Use Case Using React

Image
Hello everyone, In this blog we will see how we can create external component using react in Sitecore Content Hub. In one of my old blogs, I have created a similar component using Knockout JS. We will consider the same use case to build this component but using React. Before starting our blog, I will highly encourage you to read my old blog here . Creating external component, assigning the component to Asset Details page, making it visible on the page will be exactly same as we have done in the old blog. The changes what we are going to do in Content Hub, I will add the screenshot below. Before developing the component in react, we need to setup our React front end solution. I would highly recommened to watch the youtube tutorial for setting up the front end solution here . Adding few helpful command below which is required during setup. I will provide all reference link below in reference section. // For creating new react project using Vite npm create vite@latest //Quic...

Creating Email Template In Content Hub Programmatically

Image
Hello everyone, In this blog we will see, how we can create mail template programatically in Sitecore Content Hub. So let's quickly try to see the code and we will understand it afterwwards. using System.Collections; using System.Collections.Generic; using System.Globalization; using System.Linq; using Stylelabs.M.Sdk; using Stylelabs.M.Sdk.Models.Notifications; using Stylelabs.M.Sdk.Contracts.Notifications; using Stylelabs.M.Sdk.Contracts.Base; using Stylelabs.M.Sdk.Contracts.Content; using Stylelabs.M.Base.Querying; using Stylelabs.M.Base.Querying.Filters; CultureInfo culture = CultureInfo.GetCultureInfo("en-US"); MClient.Logger.Info($"SS - Creating Email Template"); IMailTemplate template = await MClient.EntityFactory.CreateAsync(Constants.MailTemplate.DefinitionName) as IMailTemplate; template.Name = "MailNotificationReject"; template.SetSubject(culture, "SS Mail Notification Reject"); template.SetBody(culture, "Email...