Optimizely Nuget Feed Explorer
Tool to explore the packages available on the Optimizely Nuget Feed:
Recommendations for you
Older posts
Alt text helper for Optimizely CMS 12 and Optimizely DAM
Author: Seobility - License: CC BY-SA 4.0Optimizely CMS 12 offers out the box integration with Optimizely DAM allowing users to easily select images from the DAM. Its also possible to access the meta data for these assets such as the alt text.
One of the most common requests I hear is "How do I access the alt text for the image". Implementors can render alt text to a page using ASP.net MVC or HTML or tag helpers as described here: Caching & Rendering of metadata from the DAM. However many developers just want to grab the alt text to put into their own view models or even use directly in the view.
This post describes a helper I put together to help implementors get the alt text for an image from Optimizely DAM using Optimizely CMS 12. The code for the helper allows users to pass a content reference and will return a string containing the alt text of the image as configured in Optimizely CMP.
Implementation
Steps to implement:
Use Optimizely DAM from the TinyMCE editor in Optimizely CMS 12
Optimizely CMS offers out the box integration with Optimizely DAM allowing users to easily select images from the DAM for use in Content Areas and Image properties.
However currently there is no way to select images for use inside TinyMCE. So I have put a button together to allow editors to select images from the Optimizely DAM inside the TinyMCE editor in Optimizely CMS 12. Once installed a new button appears that looks as follows:
Once installed editors can pick images as shown in the video below: