Precondition
As a prerequisite, the following environments are working:
- Sitecore Experience Platform 10.1
- Sitecore Content Hub 4.0.1 - DAM & CMP
Installing modules
Sitecore Connect for Content Hub modules that support Sitecore 9.3-10.x and Sitecore Content Hub 4.x are available for download at:
Modules for versions before Sitecore Content Hub 3.4 are separate. However, Sitecore Content Hub will be upgraded accordingly, and the latest version is 4.0.1 when writing this article, so we will proceed with the description based on the latest version.
This time, the version of Sitecore where you install the module is 10.1 XP, so the following modules apply:
- Sitecore Connect™ for Content Hub XP 10.1
When you download from the site, the following files are downloaded.
- Sitecore Connect for Content Hub XP for 10.1 v. 4.0.0 rev. 00229.zip
Open this file, install the package in the control panel, the management area, upload the package and specify it.
As you proceed through the dialog, the connectionstring.config displays the following settings:
The code is as follows:
<add name="CMP.ContentHub" connectionString="ClientId={client_id};ClientSecret={client_secret};UserName={username};Password={password};URI={uri};" />
<add name="CMP.ServiceBusEntityPathIn" connectionString="{Azure Service Bus connection string with incoming topic}" />
<add name="CMP.ServiceBusSubscription" connectionString="{Subscription name}" />
<add name="CMP.ServiceBusEntityPathOut" connectionString="{Azure Service Bus connection string with outcoming topic}" />
<add name="DAM.ContentHub" connectionString="{Content Hub URI}" />
<add name="DAM.SearchPage" connectionString="{Content Hub search page URI}" />
<add name="DAM.ExternalRedirectKey" connectionString="{External redirect key}" />
During installation, you will see that there are already items. To do so, select Join and click Apply. After a while, the module installation is complete.
Connecting to a DAM
Prepare on the Content Hub side
The first step is to prepare the Content Hub side. In the Administration screen, open Manage - Settings, and open the PortalConfiguration - CORSConfiguration settings screen.
Now press the Add button and enter the URL. For example, https://yoursitecore.instance.com enters a new value. Save to complete the CORS configuration.
Sitecore Experience Platform Settings
Next, we will proceed with the settings on the CMS side. In this part, I will explain the connection with DAM.
First, add the settings that came up during installation to ConnectionStrings.config.
For DAM, there is only the last three lines. I will introduce the CMP settings next time, so I will comment on the CMP part and proceed with the dam setting for the time being. The configuration examples are as follows.
item | Settings | example |
---|---|---|
DAM. ContentHub | Content Hub instance name | https://sample.stylelabsqa.com |
DAM. SearchPage | Description of the iFrame used in DAM | https://sample.stylelabsqa.com/ja-JP/sitecore-dam-connect/approved-assets |
DAM. ExternalRedirectKey | Keys for use with SSO | This time it's not SSO, so enter SAML |
Set the information about content hub servers to the same if they are the same, as follows if the servers for delivery are different. This code rewrites the Content-Security-Policy in web.config system.webServer - httpProtocol - customHeaders.
<add name="Content-Security-Policy" value="default-src 'self' 'unsafe-inline' 'unsafe-eval';
img-src 'self' data https://content-hub-url.stylelabs.com/ https://content-hub-url-delivery.stylelabs.cloud/;
style-src 'self' 'unsafe-inline' https://fonts.googleapis.com;
font-src 'self' 'unsafe-inline' https://fonts.gstatic.com;
upgrade-insecure-requests; block-all-mixed-content;
child-src 'self' https://content-hub-url.stylelabs.com/ https://content-hub-urldelivery.stylelabs.cloud/;
connect-src 'self' https://content-hub-url.stylelabs.com/ https://content-hub-urldelivery.stylelabs.cloud/;
media-src https://content-hub-url.stylelabs.com/ https://content-hub-urldelivery.stylelabs.cloud/;" />
You are now ready.
Add Japanese resources
The connector is slightly out of Japanese resources, so follow these steps to import the data.
- download ContentHub40-en-JP.xml from https://github.com/SitecoreJapan/InstallScript/tree/master/101
- Open The Control Panel in your Manage - Globalization - Import Language Files
- Import ContentHub40-en.xml resources into the Core database
The Japanese UI will now be displayed on the management screen.
Check operation
Now that you've set up Sitecore Content Hub and Sitecore CMS, you're ready to go.
First, log in to Sitecore in your Management screen and open the rich text box for the appropriate item.
Click the fifth icon from the left. :
After a while, you'll see a dam screen.
You can now access the DAM from Sitecore and embed the image.
Summary
In this part, we introduced the link between Sitecore Content Hub DAM and Sitecore CMS images. On the actual content management screen, you'll see that you can easily use the images you manage in dam. Next time, I'll introduce another feature: connecting to Sitecore Content Hub CMP.
Comments
Post a Comment