You can add new navigation bar entries to Act! Premium (access via web) using the UILayoutManager class found in Act.Web.Controls.Layouts. You can manipulate the navigation bar using the IWebNavBar interface defined in the Act.Web.Framework assembly. Plug-ins access the navigation bar via the NavBar property of the ACTSessionManager.
You add new items at runtime, and you add them to the plug-ins Init() method.
To add a navigation bar item
session.NavBar.AddCustomNavBarItemProvider(new Act.Web.Framework.CustomNavBarItemProvider(this.ServeCustomNavBarItem));
private bool
ServeCustomNavBarItem(Act.Web.Framework.ACTSessionManager session, out string id, out string action, out string cssclass, out string imageUrl, out string width, out string height, out string caption)
{
//the custom navigation bar item id
id = "today";
//the action to perform when clicking on the custom navigation item
action = "SaveAndNavigate(\"" + session.AppPath + "Plugins/Content/SamplePlugin/Today.aspx\");";
//css class
cssclass = "hand";
//the URL to the image to use in the custom navigation bar item
imageUrl = session.AppPath + "Plugins/Content/SamplePlugin/today.gif";
//dimensions
width = "44";
height = "38";
//the caption on the item
caption = "Today";
return true;
}
This page should inherit from Act.Web.Framework.Page or Act.Web.Framework.EmailPage (if you need email sending capabilities) to gain access to the ACTSessionManager. This is how plug-in pages gain access to the ActFramework as well as other APFW SDK methods.
<%@ Page MasterPageFile="Dummy.master" …
protected override void OnPreInit(EventArgs e)
{
//change the Master Page affiliation
this.MasterPageFile = "~/MasterPages/ListViewMasterPage.master";
base.OnPreInit(e);
}
How do I...?