Hello, Sitecore enthusiasts out there!👋 In today's blog, we're going to learn how to include public asset URLs in the default Excel export settings of Sitecore Content Hub.
When you use the export to Excel feature, it includes all fields in the output file by default. To specify exactly which fields to include, you need to create export profiles. In our use case, we want to include publicly accessible URLs in our Excel sheet when exporting our assets.
Creating an export profile in Sitecore Content Hub to include asset public media URLs in your Excel exports is straightforward. Here’s how to do it:
1. Log in to Sitecore Content Hub: Access your account with admin or superuser privileges. Proper permissions are required to make changes.
2. Access Export Profiles: After logging in, navigate to the 'Manage' ⚙️ and select Export Profiles.
3. Create a New Export Profile: Click on the ➕ Export Profile button on the top right side.
4. Configure Your Export Profile: In the pop-up that appears, enter the name of your export profile and select the entity definition for the export. For assets, you'll use Asset (M.Asset). If you want this profile to be the default for the selected entity definition, make sure to check the corresponding box. Then, configure the JSON settings as follows:{
"properties": [
"Title",
"Description",
"FileName"
],
"relations": {
"FinalLifeCycleStatusToAsset": {
"exportRelatedEntities": false
},
"ContentRepositoryToAsset": {
"exportRelatedEntities": false
}
},
"includeSystemProperties": true,
"publicLinks": {
"asset": true,
"masterfile": true
},
"version": "1.1"
}
- Creating a Public Link for an Asset: Go to the Asset Page, select the asset for which you want to create the public link, then click on the three dots in the 'All Files' section to find the option to create public links.
- A pop-up will appear where the URL path is auto-generated. You can set an expiration date for the public link or leave it unset for the link to never expire.
- Save your settings, and a public link will be generated for that asset, marked as 'never expires' if no expiration date is set.
- You can also generate public links for multiple assets simultaneously. To do this, navigate to the Assets page and select the assets for which you wish to create public links. After selection, click on the "..." dots to reveal more options, and choose "Create Public Links." This action opens a mass edit and public links creation window. Within this popup, you'll find the Public Link section where you can specify the expiration date for these links. Additionally, you have the option to select the rendition of the assets for the public links, with choices including original, preview, and thumbnail. After setting your preferences, simply click 'Save' to generate the public links for your selected assets.
Important Note:
Conclusion:
This walkthrough has shown you the straightforward steps to include public links in your Excel exports of assets from Sitecore Content Hub. By following these guidelines, you ensure that every exported asset is just a click away from its corresponding media content, enhancing the utility of your Excel reports. Stay tuned for more engaging and informative blogs like this one. Keep exploring, keep learning!😊
Nice Content.. keep up the good work.. HB
ReplyDelete