Editpanel Plugins på vissa sidtyper

Hej Jag håller på och bygger en EditPanel Gui plugin och skulle vilja att denna endast är synlig på vissa sidtyper. Har försökt att sätta denna till Visible = false men då syns fortfarande fliken. Vet någon hur man göra detta? /Peter
#12189
Dec 13, 2004 14:36
Hi, you can determine if a plugin should be visible by implementing the ICustomPlugInLoader interface. Make sure you inherit from UserControlBase: public class PageUtilPlugin : UserControlBase, ICustomPlugInLoader and implement the ICustomPlugInLoader.List method: public PlugInDescriptor[] List() { PlugInDescriptor[] aDescriptors = null; // Check if we should show the plugin if (PageBase.CurrentUser.IsInRole("Administrators") != false) { aDescriptors = new PlugInDescriptor[1]; aDescriptors[0] = PlugInDescriptor.Load(this.GetType()); } // else return null return aDescriptors; } The effect, this plugin will only be shown to users in the Administrators group.
#13818
Dec 13, 2004 16:47
* 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.