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

Custom displayoptions per block

Vote:
 

Hi!

I have not been able to find an answer to this issue of ours but I'm sure it should be possible. I'm fairly new to episerver, I may have the wrong terminology and that's why I'm unable to find the solution. 

In out solution we have maybe 15 different blocks, some of them should always be full-width, and some of them should be changeable between one-third, half and full-width. In our displayoptions-initialization we just hardcode values like this

var options = ServiceLocator.Current.GetInstance();

options
.Add("full", "/displayoptions/full", EPiServerConstants.ContentAreaTags.FullWidth, "", "epi-icon__layout--full")
.Add("half", "/displayoptions/half", EPiServerConstants.ContentAreaTags.HalfWidth, "", "epi-icon__layout--half")
.Add("narrow", "/displayoptions/narrow", EPiServerConstants.ContentAreaTags.OneThirdWidth, "", "epi-icon__layout--one-third");

so every contentarea + every block gets all three options - there must be away to limit this per contentarea/block, right?

Regards,

Erik

Episerver 7.5

#162140
Edited, Oct 11, 2016 15:52
Vote:
 

Looks perfect, I'll check it out!

Edit:

Worked like a charm!

#162184
Edited, Oct 12, 2016 11:15
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.