How do I work with the default Optimizely Content Renderer?

  • Page Owner: Not Set
  • Last Reviewed: 2021-11-24

There's barely any documenation about what "magic" properties I can use when dealing with PropertyFor and content areas. What do we know?


Additional Posts

For a content area property, I've found the following additional view data properties to be useful:

  • CssClass = string class to add to the outermost <div> when rendering a content area

  • ChildrenCssClass = string class to add to the <div> that surrounds each content item rendered within a content area

  • CustomTag = string html element name for outermost wrapper tag (ex: "ul")

  • ChildrenCustomTagName = string html element name for wrapper tag for each content item (ex: "li")

  • HasContainer = when set to false, the outermost <div> wrapper tag is suppressed

  • Tag = string tag name of template to render (ex: "Navigation" or "Sidebar" ect)

    • This should also work for other property types

Unfortunately, out of the box I don't think there is a way to suppress the children wrapper tag. Please tell me I'm wrong.