Try our conversational search powered by Generative AI!

Display Options on Blocks

Vote:
 

We have read this article: http://world.episerver.com/Documentation/Items/Developers-Guide/EPiServer-CMS/7/Content/Display-Channels/ on Display Blocks but have no idea where we set this up. The Global file has some reference to displayOptions but our Content Blocks dont have a Display Options in the Edit Drop down menu. Do we need to set other sections up too?

 

Jon

#80588
Jan 27, 2014 12:49
Vote:
 

Hi,

I think you are mistaking display options for display channels.

This is probably what you need:
http://world.episerver.com/Documentation/Items/Developers-Guide/EPiServer-CMS/75/Rendering/Display-options/Display-options/

If you install the Alloy 7.5 templates, there are a few display options configured in global.asax

#80589
Jan 27, 2014 12:58
Vote:
 

We have this set up in the Global but it still doesnt show

#80592
Jan 27, 2014 14:49
Vote:
 

This is what we have in the Global file:

   protected void Application_Start(Object sender, EventArgs e)
        {


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

    But we dont see this option in the Blocks. Any ideas?

#80636
Jan 28, 2014 11:27
Vote:
 

It looks correct to me. What happens if you browse to {siteurl}/{uiurl}/cms/Stores/displayoptions/?

Do you get the options returned?

#80638
Jan 28, 2014 12:01
Vote:
 

Hi, we just popped it into the InitializeModule and it now works. Thanks for your help

#80641
Jan 28, 2014 12:17
Vote:
 

Now that the displayOptions are working what else do we need to set up for the options to work on the pages? Looking at the Alloy site there is a page called BlockPreview that uses a Repeater - does this need to be created and if so where does the page go and how is it used?

 

 

#80643
Jan 28, 2014 12:37
Vote:
 

I'm would like to access a block's choosen display option from within a block template.

Since that's where I already have all the functionality to dynamically add classes to the blocks depending on different properties.

Is there any way or do you really have go through the whole SitePropertyContentAreaControl (in Alloy Web Forms) thingamabob. I would really hate to have to mix up where I add css classes to stuff.



#81010
Feb 07, 2014 8:47
Vote:
 

Previous link broken.

Here's the correct one: http://world.episerver.com/Documentation/Items/Developers-Guide/EPiServer-CMS/75/Rendering/Display-options/Display-options/

#90757
Sep 17, 2014 13:40
* 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.