AI OnAI Off
What are you looking to ahieve? Is it down at the API level or something in the EPiServer UI?
I'm making a plugin which, without going into too much detail, should get the name of the editor and the current page id whenever the Edit tab is clicked. It would be preferable if this could be achieved through the API, but other solutions are welcome as well.
Hello William
You can use the plug in architecture to hook into the edit panel itself (via the LoadComplete event). This fires when the edit panel is being set up so you can get the page ID and editor name here:
[GuiPlugIn(Area = PlugInArea.EditPanel)]
public class EditPanelHook : ICustomPlugInLoader
{
public PlugInDescriptor[] List()
{
// hook LoadComplete-event on EditPanel page
EditPanel editPanel = HttpContext.Current.Handler as EditPanel;
if (null != editPanel)
{
editPanel.LoadComplete += new EventHandler(editPanel_LoadComplete);
}
//Never return a plugin - we don't want to add tabs.
return new PlugInDescriptor[0] { };
}
protected void editPanel_LoadComplete(object sender, EventArgs e)
{
//Code to grab the user and page ID here
}
}
Hi,
I've spent several days searching for a way to detect when the Edit tab (in Edit Mode) is selected. I know that DataFactory contains several methods for catching events, but it doesn't include one for an Edit tab-clicked event.
Is there any way to catch this event and attach an event handler to it?
Thanks!