SaaS CMS has officially launched! Learn more now.

Show tab in EditPanel only when page is published.

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)?
Mar 01, 2005 16:35
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; } }
Mar 01, 2005 17:43
woops, forgot to cut out the constructor. That one is not relevant ;)
Mar 01, 2005 17:50
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
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.