Don't miss out Virtual Happy Hour today (April 26).

Try our conversational search powered by Generative AI!

Show tab in EditPanel only when page is published.

Vote:
 
I want to make a tab in the EditPanel that only shows upp when the current page is published. Is that possible? Is it also possible to just show a tab when a specific propery on the page is set (similar to how the Form data-tab for the native Form type behaves)?
#12227
Mar 01, 2005 16:35
Vote:
 
After some testing I found out that I can do it in this way. Is it a correct way to do it? To get info of the current pag I inherit from UserControlBase, is that the way to go? [GuiPlugIn(DisplayName="Test", Description="Test Tab", Area=PlugInArea.EditPanel, Url="~/test.ascx")] public class TestTab : UserControlBase, ICustomPlugInLoader { #region ICustomPlugInLoader Members public PlugInDescriptor[] List() { PlugInDescriptor pid = null; if(this.CurrentPage.CheckPublishedStatus(PagePublishedStatus.Published)) pid = new PlugInDescriptor(1,"TestTab","TestProject"); return new PlugInDescriptor[] {pid}; } #endregion public PropertyNewsletter() { this.Visible = false; } }
#13882
Mar 01, 2005 17:43
Vote:
 
woops, forgot to cut out the constructor. That one is not relevant ;)
#13883
Mar 01, 2005 17:50
Vote:
 
Correct, but make sure you don't return a array with null values. Check out this source file in the SDK zip for how the forms data tab handles this interface: sdk\source\EPiServer\edit\FormPostings.ascx.cs
#13884
Mar 02, 2005 11:08
* 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.