views:

25

answers:

1

Is it possible to add a TaskItem (or TaskList) to the website page (Web Objects Home Page)?

I'd like to provide some contextual access to my addin and I can't seem to find a good integration point.

A: 

Many thanks to CarlosAg on the IIS.net forums for the basis of this answer.

  1. Create a class that subclasses ProtocolProvider and have it return a TaskList by overriding GetSiteTaskList and GetSitesTaskList.

  2. In your Module.Initialize method, get an IExtensibilityManager from the serviceProvider

  3. Register an instance of your ProtocolProvider to the IExtensibilityManager by calling RegisterExtension.

Update

It turns out a ProtocolProvider can only provide a TaskList for the "Sites" view, but can provide a different TaskList depending on which site is selected (if any).

To provide a custom TaskList for a site's homepage (ie. with the list of features), you need to implement IHomepageTaskListProvider and register it with the IExtensibilityManager mentioned above.

Within the IHomepageTaskListProvider.GetTaskList implementation, you can find out if you the current "homepage" is a site or global by getting a Connection from the IServiceProvider and checking the ConfigurationPath.PathType property (it's an ConfigurationPathType enumeration)

Richard Szalay
@CarlosAg: If you end up deciding to post, I'll mark yours as the answer.
Richard Szalay

related questions