SaaS CMS has officially launched! Learn more now.

Adding a displayoptions(?)



Can I add another displayoptions for blocks? I need to sort the blocks in mobile-view.

Instead of this: 

(Cannot add images).. For blocks in a contentarea you have dropdownlist(?) that have name like: 

  • Edit
  • Display as
  •  - Half
  •  - One thirt (etc.)
  • Personilize 
  • Move up
  • Move down
  • Remove

I'd like to add another "Display as" that adds my class to the block in edit-mode for sorting in a mobile view so the editors can choose the sortorder for the block in EPi. 

I dont know if this even is possible and I might have to rethink this. 


Sep 30, 2021 9:33

Display options are setup as part of the custom code of your solution. The demo instance come with full, wide and narrow so these options you've got would have been custom. 

This explains how to do it so you should search for IInitializableModule instance in your solution to find where these are configured.

Sep 30, 2021 10:06

Hi Scott, thank you for the reply! 

I mean that i want another tab that is simular to the "DisplayOptions" but a new one. Is that achivable with IInitializableModule? I mean something like this: 

Original code: 

   // Register Display Options
                var options = ServiceLocator.Current.GetInstance<DisplayOptions>();
                  .Add("full", "/displayoptions/full", Global.ContentAreaTags.FullWidth, "", "epi-icon__layout--full")
                  .Add("wide", "/displayoptions/wide", Global.ContentAreaTags.TwoThirdsWidth, "", "epi-icon__layout--two-thirds")
                  .Add("narrow", "/displayoptions/narrow", Global.ContentAreaTags.OneThirdWidth, "", "epi-icon__layout--one-third");

Instead i want this: 

                // Register Display Options
                var options = ServiceLocator.Current.GetInstance<MyOwnCustomDisplayClass>();
                  .Add("first", "/rendered_from_xml/name", custom.areatag.firstitem, "", "class-added-first")
                   .Add("second", "/rendered_from_xml/name", custom.areatag.seconditem, "", "class-added-second")
                  .Add("third", "/rendered_from_xml/name", custom.areatag.thirditem, "", "class-added-third")

And then i want it to be added inside episerver when you click the hamburgermenu on blocks to be added on each contentareaitem. 

Sep 30, 2021 10:49
Scott Reed - Sep 30, 2021 12:58
Not out of the box, you'd have to create an extension to the DOJO editor in the CMS along with an API to power these options or inject them in to the script. It would be quite a bit of work to get that to work. If you're just try to create block sorting in a content area per device type you could create multiple content areas for each device profile which would allow independent sorting unless I'm mis-understanding the requirements.
* 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.