Most of my readers know me as a dedicated Sitecore professional, however, close friends are aware of the variety of my hobbies. Some of them also know me as a Scotch whisky expert and collector. After living in the UK for almost 15 years, I got a pretty decent collection of these spirits and learned hundreds of facts from attending dozens of whisky distilleries in Scotland.
Once I got my hands on a new SaaS offering from Sitecore – Content Hub ONE, I decided to give it a try on a practical example and try its capabilities as I was doing a real application. What would I use for the demo purposes? Something I know much about – that’s how exposing my whisky collection was chosen. Let’s go through all the way starting with content modeling, going through actual data and media authoring and publishing, and eventually creating a headless app for content delivery.
Once I got access to Content Hub ONE, I felt curious about what I can do using it. After logging through the portal, I got the ascetic main interface:
It exactly mimics your expected activities here: Content Types is used for Content modeling, Media is for uploading media assets, and Content is for creating content from your types and referencing uploaded media.
Content Hub ONE comes with handy documentation that helps understand the operations.
For my purpose, I need to set up two content types – a listing type featuring items from the collection and item types itself to be used on the corresponding pages (marketers also know them as PLP and PDP).
Macro Trends in Sitecore and DXP
Over the past few years, Sitecore has transformed its architecture, offerings, and vernacular. The DXP landscape is evolving and organizations are increasingly embracing these changes. This guide explores six emerging trends in Sitecore and the DXP landscape.
Let’s start with a whisky type that represents an actual item from my collection. You can only choose from these basic field types:
Texttype can be either short single-line value or multi-line long text up to 50,000 characters
Rich textincludes markup and can take even more – 200,000 characters. It does not accept raw HTML.
Date/Timeare obvious and speak for themselves.
Referencegives the ability to link other content records to this item, with the unfortunate limit of max 10 items per field
Mediais similar to the above with the difference that it allows referencing uploaded media items.
Unfortunately, some crucial fields are missing, such as those used for storing links, URLs, and email addresses.
I ended up with the following structure for a
whisky item type that features as many various field types as possible:
Next, let’s create a
collection type to include a collection of items as well as some descriptive content within
rich text type:
Pay attention to the archive field. From the home page, I want to distribute a zip archive with all 50 images of my collection, so I included this media field. A few challenges of this implementation are described below.
Content Hub ONE users can upload media so that it gets published to Experience Edge CDN. However, its usage is limited to only images of GIF, JPG, PNG, and WEBP formats.
That is not sufficient for my demo purposes. I needed to upload videos of creative ads for each of my whisky items, as is referenced at whisky type. I also wanted to upload a ZIP archive with all 50 images featuring my entire collection, referenced at collection type. This is not something extraordinary and is very common for content-powered websites.
So, the question is – can I upload archives and videos? Currently – no, you cannot. However, nothing stops you from renaming your asses to something like video.mp4.jpg or archive.zip.jpg so that it successfully passes upload validation and actually gets uploaded and later published to Edge. With a 70Mb limit per media item, it can host many items including reasonably converted videos, archives, or whatever you may want to put there.
Please be aware that since anything else than images isn’t officially supported, you may lose access to such content once. Use it at your own risk!
In the next post, I will show how your head application can consume such content, including “alternative” non-supported media types.