Adding a tab
You can add new tabs to Act! Premium (access via web) using the UILayoutManager class found in the Act.Web.Controls assembly. You add new tabs at runtime and must add them in the plug-in Init() method.
To add a tab
- In Init(), use the UILayoutManager.AddCustomTabProvider() method to provide Act! Premium (access via web) with a callback function used to initialize the tab. For example:
Act.Web.Controls.Layouts.UILayoutManager.AddCustomTabProvider(Act.Web.Controls.Layouts.LayoutType.Contacts, new Act.Web.Controls.Layouts.UILayoutManager.CustomTabProvider(this.ServeCustomTab));
- Implement the tab provider to return the text displayed on the tab and the location of the tab page. You must set the "tabURL" parameter to the full path of the tab page. To get the Act! Premium (access via web) path, use the session.AppPath property, and then append the location of the plug-in page relative to the root APFW folder. For example:
private bool
ServeCustomTab(Act.Web.Framework.ACTSessionManager session, out string tabName, out string tabURL)
{
tabName="sample plugin";
tabURL = session.AppPath + "Plugins/content/SamplePlugin/foo.aspx";
return true;
}
- Create the page. The page may reside in the plug-in assembly or in a separate assembly. You must copy the ASPX file to the location specified in the CustomTabProvider method, and you must copy the assembly containing the code behind file to the root APFW folder.
Tab pages should inherit from Act.Web.Framework.Page to gain access to the ACTSessionManager. This is how plug-in tabs gain access to the ActFramework as well as other SDK methods.
How do I...?
Add a navigation bar item
Add a plug-in
Edit the menu
Edit a toolbar