Custom Button on Content Details Page in Sitecore Content Hub

In this blog post, I will discuss how to add a custom button on the Content Details page in the Sitecore Content Hub. To understand the use case of this feature, suppose you have a client requirement to perform any business logic on that particular entity for instance updating field values or applying auto-tagging, etc.

1. Go to the pages option from the Manage button in the top right corner of the Home page.

custom-button-details-page-ch-1

2. In the pages, search for the Content Details page:

custom-button-details-page-ch-2

3. On the Content Details page, locate the operations/entity operations, in the Header Zone (Right). By default, it can be disabled so enable it by system settings.

custom-button-details-page-ch-3

4. After that, it will be enabled, and click on the Operation/Entity Operations it navigates to the entity operation component.

custom-button-details-page-ch-4

5. We will add a new operation, click on the Add operation button on the top left and find the custom External Action.

custom-button-details-page-ch-5

6. Name it as per your requirement, I am naming it AI Tagging, to change the icon click on the plus sign icon, and add action from the action option. I am adding my custom action “CMP – AI Tagging – Action” in which I have written a custom script for my business logic. 

By clicking on the Plus sign, you can add more than one action and some other operation settings you can explore as per your requirement. Click on save to save your changes in the new operation.

custom-button-details-page-ch-6

To know more about how to create a custom script, action, and trigger, see the blog post:

Also, can go through another blog in which I explained trigger an action using Postman, see the blog post: Create Script, Action, and Trigger in Sitecore Content Hub

7. To check the custom action button, navigate to any Content entity page and click on the custom action button "AI Tagging":

custom-button-details-page-ch-7

8. We can see logs in our scripts whether it's successful or not.

custom-button-details-page-ch-8

Happy Sitecoreing ðŸ˜Š

Comments

Popular posts from this blog

Sitecore Installation Error: Failed to Start Service 'Sitecore Marketing Automation Engine'

Import CSV Data in Sitecore Using PowerShell: Part-3

Sitecore Technology MVP Journey 2022