Don't miss out Virtual Happy Hour this Friday (April 26).
Try our conversational search powered by Generative AI!
AI OnAI Off
Don't miss out Virtual Happy Hour this Friday (April 26).
Any update on this.. As i have same issue.. i want to hide one of custom tab in specific pagetype based on some condition. I dont know how to access the custom tab through code.
This should get you started.
public class TabRemover : PlugInAttribute
{
public static void Start()
{
EPiServer.UI.Edit.EditPanel.LoadedPage += EditLoaded;
}
public static void EditLoaded(EditPanel sender, LoadedPageEventArgs e)
{
if (e.Page.PageTypeName == "News Archive Page")
{
if (e.Page.Property["PageCategory"] != null)
{
e.Page.Property["PageCategory"].DisplayEditUI = false;
}
}
}
}