It should be called when a plug-in of a specific type is loaded, on what type of plug-in have you implemented this interface?
Hi! Thank you for your reply! My class looks like this:
[IFrameComponent(Url = "~/Views/EPiServerPlugins/ContestExportResult.aspx",
ReloadOnContextChange = true,
PlugInAreas = PlugInArea.Assets,
Title = "Iframe test",
Categories = "cms",
MinHeight = 100,
MaxHeight = 500)]
public partial class ContestExportResult : ContentWebFormsBase, ICustomPlugInLoader
{ ... }
It seems to be automatically included on every page's Asset menu and I just want to include it (automatically) on some pagetypes.
Br
Erik
Hi Erik!
In EPiServer 7, components are not recreated each time you change context (page, block etc.) but static. Therefore, we do not honor this interface. Since the IFrameComponent can be reloaded when the context is changed, you can check the item and present the user with a dummy view if your page does not make sense for the content.
However, I think what you probably want to do, is to have a view that might be available for certain content types. We somewhat have support for that since the release of EPiServer 7.5, even though it's not that well documented. The reason for this is that we are still missing some parts in the core to make it really usefull.
My collegue has written a blog post about this: http://world.episerver.com/Blogs/Duong-Nguyen/Dates/2013/12/Custom-views-and-plugin-areas-in-EPiServer-75/
In my comments, I write how to bind this to a web forms generated view. However, I plan to do a separate blog post about this topic to make this clearer and I also hope that we add the missing features to make this really useful in the near future.
Thanks Linus, I ended up using your approach from this blog post:
http://world.episerver.com/Blogs/Linus-Ekstrom/Dates/2014/4/Adding-custom-views-to-your-content/
Br
Erik
Hi. After ugrading to EPi7.5 (from 6r2) my ICustomPlugInLoader PlugInDescriptor[] List() methods are not called anymore. Is there anything that has happend in this area? I'm running .net4 / webforms.
Thanks!
Erik