Try our conversational search powered by Generative AI!

Display Options: renderSettings null in the controller



I'm trying to do some tests with Display Options on our site and it seems that even if I choose any display option on a block in our CMS, I don't get the chosen value in the block controller.

Here's the initialization module where we add the options:

public class DisplayRegistryInitialization : IInitializableModule
public void Initialize(InitializationEngine context)
if (context.HostType == HostType.WebApplication)
// Register Display Options
var options = ServiceLocator.Current.GetInstance();
foreach (var optionId in options.Select(x => x.Id).ToArray())

.Add("full", DisplayOptionTags.FullWidth, "full", "Full screen", "epi-icon__layout--full")
.Add("wide", DisplayOptionTags.TwoThirdsWidth, "wide", "Large (2 thirds)", "epi-icon__layout--two-thirds")
.Add("half", DisplayOptionTags.HalfWidth, "half", "Half", "epi-icon__layout--half")
.Add("narrow", DisplayOptionTags.OneThirdWidth, "narrow", "Narrow (1 third)", "epi-icon__layout--one-third")
.Add("quarter", DisplayOptionTags.OneFourthWidth, "quarter", "1 quarter", "epi-icon__layout--one-fourth");

Now when I select a block in a contentArea in the CMS, I can select my options in Display As. But even if I choose one of the options and publish the block, in the block controller, renderSettings is always null.

Here's the code I use to access my display option(tag):

var renderSettings = this.ControllerContext.RouteData.Values["renderSettings"] as Dictionary;

In  this.ControllerContext.RouteData.Values, I see the key "renderSettings" but the value is always null even if I chose a display option on a block.

Am I missing something?

Feb 28, 2018 15:50


do you receive set display options in view fo the block instead? I can't remember correctly whether all the rendering info was passed down to the controller of the block. But I recall (when developing bootstrap area renderer plugin) that there was some weird error about how Episerver is treating tag & display options. latter was overwritting set tag.. code fragment here:

Mar 23, 2018 8:38

Yan, did you resolve this? I'm having the exact same problem

Apr 24, 2018 14:21

which versions are you guys running on? I can confirm that could not repoduce this is latest (11.6). anything special about your project? alloy works as expected.

May 09, 2018 14:24
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.