Try our conversational search powered by Generative AI!

Migrating GuiPlugin to IFrameComponent

Vote:
 

Hello,
I have an existing Episerver 6 site which is beeing migrated to Episerver 7.5. The site has a plugin which is displayed as a tab in the edit mode in episerver 6.
It is decorated with [GuiPlugIn(DisplayName = "..", Description = "", Area = PlugInArea.EditPanel,...]

I managed to rewrite it to
[IFrameComponent(PlugInAreas = PlugInArea.Assets, ...]

However I only can it add to the dashboard or to the assets pane. I can't find Any way to add it to the edit panel. It is possible to do that?

#88277
Jul 09, 2014 10:46
Vote:
 

Hi

This forum should answer your question, including a really useful gallery by Johan Petersson showing the location of each PlugInArea. 

David

#88368
Jul 09, 2014 21:32
Vote:
 

Hi David,
Thank you, but the only areas available are not very well suitable for my case. I would like to have that component as a tab in the property edit interface. In the similar way as it was in episrever 6. Now it seems that such ability is lost.

#88387
Jul 10, 2014 13:34
Vote:
 

You might want to take your chance with a property in a separate tab, where you would render an iframe. See the example in alloy tech templates, StringList, except that instead of rendering a textbox, you would render an iframe.

I don't think this is a correct approach, but if you really need it, it might be a workaround.

#88463
Jul 14, 2014 17:12
Vote:
 

Wouldn't a Edit widget be what you are looking for?

http://tedgustaf.com/blog/2014/6/create-an-episerver-widget-for-edit-mode/

#88474
Jul 15, 2014 8:55
Vote:
 

Hello,
Edit widget would work, but we already have an user control writen, so rewriting in it javascript would be a big task.
We settled on additional view for now as described here http://world.episerver.com/Blogs/Duong-Nguyen/Dates/2013/12/Custom-views-and-plugin-areas-in-EPiServer-75/ . It can easily take a user control.
Maybe it's possible to use user control as an editor for a property?

Giedrius

#88478
Jul 15, 2014 9:11
Vote:
 

Hi, I thought you didn't want to place it in assets. If this is an option for you, then you simply create aspx out of your ascx and inherit from EditContentWebFormsBase along with the following decoration:

    [IFrameComponent(Url = "modules/Plugin.aspx",
        ReloadOnContextChange = true,
        PlugInAreas = "/episerver/cms/assets",
        Categories = "cms",
        MinHeight = 400,
        MaxHeight = 650,
        SortOrder = 201,
        Title = "plugin title",
        Description = "plugin description",
        IsAvailableForUserSelection = true
        )]
      public partial class Plugin : EditContentWebFormsBase

You can also specify that the masterpage is set on preinit:

protected override bool SetMasterPageOnPreInit
        {
            get
            {
                return true;
            }
        }

Then, you simply c/p ascx to 

You can get the current content by accessing CurrentContent.

#88483
Jul 15, 2014 9:44
Vote:
 

Hi,
Yes i don't like that it is in assets and i would like to have it as an tab in the edit interface. I also need to use existing user control without much reworking. But it seems such use case is not supported, which is sad.

However, we can add that control as addition edit view which is sufficient for my case.

#88493
Jul 15, 2014 11:46
Vote:
 

Hello Giedrius

I am not sure if you have worked around your problem but thought this post may be helpful:

David
#89199
Aug 11, 2014 10:57
* 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.