November Happy Hour will be moved to Thursday December 5th.

Tahir Naveed
Oct 11, 2019
  2012
(0 votes)

Set display options for content area item via code

On the subject of “note to self” & “for future reference”, when required to setup display options programmatically for a given content area item

ContentAreaItem newContentAreaItem = new ContentAreaItem() { ContentLink = “ID of your content”};

newContentAreaItem.RenderSettings = new Dictionary<string, object>();
newContentAreaItem.RenderSettings.Add("data-epi-content-display-option",”Id of display option”);

And to get all the registered displayoptions

var options = ServiceLocator.Current.GetInstance<DisplayOptions>();

Hope this might be useful for someone

Oct 11, 2019

Comments

Please login to comment.
Latest blogs
Optimizely SaaS CMS + Coveo Search Page

Short on time but need a listing feature with filters, pagination, and sorting? Create a fully functional Coveo-powered search page driven by data...

Damian Smutek | Nov 21, 2024 | Syndicated blog

Optimizely SaaS CMS DAM Picker (Interim)

Simplify your Optimizely SaaS CMS workflow with the Interim DAM Picker Chrome extension. Seamlessly integrate your DAM system, streamlining asset...

Andy Blyth | Nov 21, 2024 | Syndicated blog

Optimizely CMS Roadmap

Explore Optimizely CMS's latest roadmap, packed with developer-focused updates. From SaaS speed to Visual Builder enhancements, developer tooling...

Andy Blyth | Nov 21, 2024 | Syndicated blog

Set Default Culture in Optimizely CMS 12

Take control over culture-specific operations like date and time formatting.

Tomas Hensrud Gulla | Nov 15, 2024 | Syndicated blog