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

Santosh Achanta
May 24, 2018
  2032
(6 votes)

Correction to no wrappers content area renderer


Referring to Krzysztof Morcinek's blog post which is used quite a lot in the epi world, thought to share a small correction to it.

The below piece of code from the blog post renders all the items while you're in edit mode which doesn't allow users to test personalized content.

_contentRequestContext.IsInEditMode(helper.ViewContext.HttpContext)
? contentArea.Contents
: contentArea.FilteredContents

So, this piece of code can be safely replaced with the below which will just render the same items rendered by the out of the box content area renderer which allows users to test how personalized content looks like.
contentArea.FilteredItems


Image Untitled.png
May 24, 2018

Comments

valdis
valdis May 24, 2018 11:12 AM

btw, just a side note - this lib (https://github.com/valdisiljuconoks/EPiBootstrapArea) does the same thing and lot more. maybe worth to checkout and reduce code on project's side :)

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

I'm running Optimizely CMS on .NET 9!

It works 🎉

Tomas Hensrud Gulla | Nov 12, 2024 | Syndicated blog

Recraft's image generation with AI-Assistant for Optimizely

Recraft V3 model is outperforming all other models in the image generation space and we are happy to share: Recraft's new model is now available fo...

Luc Gosso (MVP) | Nov 8, 2024 | Syndicated blog