we have a number of custom plugins, that are ascx files decorated with the GuiPlugIn attributes.
WHat's the quickest and most painless way of transferring these into 7.5?
[GuiPlugIn(DisplayName = "Associate", Description = "Show businessline associator", Area = PlugInArea.EditPanel, UrlFromUi = "/plugins/edit/associatebusinessline.ascx", RequiredAccess = AccessLevel.Edit)] public partial class AssociateBusinessLine : UserControlBase, ICustomPlugInLoader
For example, the plugin above has functionality to associate two types with each other and it's not sufficient to just allow the user to select links using the standard editor control for linkItemCollection.
The GuiPlugIn-support for content was removed with the new UI in EPiServer CMS 7. The best match is probably to create a custom view for one or more content types. I've blogged about how that can be done here:
You can find the source code here along with lots of other samples on how to extend the EPiServer user interface:
Thank you Linus, I've started going down this route, but I cannot get the view loading, despite following the instructions. The view type gets added to the editor drop-down, but it does not load my simple page type. Here is what I have:
I have added a Test.aspx under ##site root##/Plugins/Edit/Test.aspx
I have also added the following class to the project:
public class SampleView : ViewConfiguration<Profile>
Key = "associateBusinessLine";
Name = "Associate";
Description = "Associate Profiles";
ControllerType = "epi-cms/widget/IFrameController";
ViewType = VirtualPathUtility.ToAbsolute("~/Plugins/Edit/Test.aspx");
IconClass = "epi-iconForms";
Am I doing something wrong?
The view stays on the On Page Editing mode after switching, and my test form does not load.
When I copy your code, associate it to the start page type it works for me. The web forms page /plugins/edit/test.aspx is loaded when I select it in the drop down. Not sure why it's not working for you. The only thing that I can think of is if you have a bug in the current version of EPiServer. Have you updated to the latest Nuget packages?
WHen I try to navigate to the aspx page, I get the following error:
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Web.HttpException: Content controls have to be top-level controls in a content page or a nested master page that references a master page.Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
[HttpException (0x80004005): Content controls have to be top-level controls in a content page or a nested master page that references a master page.]
System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection) +615
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1844
We cannot at this point upgrade to the latest nuget packages, but do you think it's a bug with the current episerver libraries? i.e: 7.5.394.2?
It's also happening when we try to add a web form component elsewhere in the admin panel.
apparently, the above is due to me having the wrong content in the aspx form. I didn't have a contentPanel in the markup...
The issue that the view does not load remains however...