Posts

Showing posts with the label Sitecore ContentHub

Creating Media Processing Flow in Sitecore Content Hub

Image
Hello everyone, In this blog we will learn, how we can add media processing workflow in Sitecore Content Hub. We will see with a use case. Use Case: When we will upload or refresh a JPEG asset entity, It will create a PNG rendition of that Asset. Checkout the below screesnhot which will help you to configure steps for creating a media processing flow. Step 1: Manage page --> Search Media Processing --> Click the Media Processing --> It will open the page Step 2 : Click on Content --> Click on Image --> It will open main page where we will add a flow Step 3 : Add new Task by Clicking + icon --> Click on Convert Image task --> Fill the parameter section. Specifying Content type is very important . Step 4 : Go to ouput section and configure the parametes. Give the label which will will shown in output name for the png rendition.Once done save task and save the flow and publish the media processing flow. Step 5 : Once published, come back to Asset Search P...

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

Creating Custom Component in Content Hub using External Component

Image
Hello everyone, In this blog, we will see how we can add an custom component in Content Hub. We will create a component which will display all related assets based on loaded Asset title. Creating custom component depends on utilizing External Component.So we will follow below steps to achieve the same. We will be using Knockout JS for the implementation. Step1 : Adding External Page Component to Asset Detail Page Step2 : Code Logic implementing Related Asset Component Step 1 Go To Manage Page --> Search Pages --> Search Asset Details. Select Any row and click on add component basically the + symbol. In above screenshot, just click the plus symbol below Related Asset component.A popup will come up. Search for External keywork in search bar and click the result which comes up.Another popup will come and we will give our component a name and enable the visisble checkbox as shown below and click Add.The component will be added to layout. Once the component is added, just c...