Quantcast
Channel: Developer to developer
Viewing all articles
Browse latest Browse all 9076

How can I display a block property in the "Type" dropdown for dynamic content when editing an XhtmlString field?

$
0
0

We're using EpiServer 8.0, and would like to enable editors in the CMS to select properties defined in a Block (rather than from a Page) when editing an XhtmlString field in the TinyMCE editor.  Currently after clicking the yellow "Dynamic Content" icon from TinyMCE, the "Dynamic Content" dialog shows only "Page property" as an option in the "Type" list.

We have placed some properties in a block which we would like to be selectable from that dialog.  I saw these posts from Linus, but was unable to figure out how to do this.

http://world.episerver.com/forum/developer-forum/EPiServer-7-CMS/Thread-Container/2012/11/Picking-Block-in-Dynamic-Content/

http://world.episerver.com/Blogs/Linus-Ekstrom/Dates/2013/12/Customizing-the-look-and-behavior-in-the-UI-for-your-content-types/

There is a UIDescriptors class in our template, that looks like this:

using EightTestTemplate.Models.Blocks;
using EightTestTemplate.Models.Blocks.Settings;
using EPiServer.Shell;
namespace EightTestTemplate.Business
{
    [UIDescriptorRegistration]
    public class GlobalSettingsBlockUIDescriptor : UIDescriptor
    {
        public GlobalSettingsBlockUIDescriptor()
        {
            DefaultView = CmsViewNames.AllPropertiesView;
        }
    }
    [UIDescriptorRegistration]
    public class NavigationBlockUIDescriptor : UIDescriptor
    {
        public NavigationBlockUIDescriptor()
        {
            DefaultView = CmsViewNames.AllPropertiesView;
        }
    }
}

The block we would like to make available is called "GlobalSettingsBlock".  But it doesn't appear in dropdown for dynamic content.  How can I make properties from this block available in that dialog?  Thanks for your help.


Viewing all articles
Browse latest Browse all 9076

Trending Articles