tags:

views:

93

answers:

2

In a number of different WSS and SharePoint sites we typically add a LeftNavZone to the default.aspx page using MS Office SharePoint Designer. I'd like to write a feature to do this programatically so it can be activated only on certain sites.

Is this possible?

I would like to add it within

<asp:Content ContentPlaceHolderId="PlaceHolderLeftActions" runat="server">
A: 

You cannot add an WebPartZone to the Pages using a feature. You will have to manually do it, but whereas you can add an webpart to the page using this AllUserWebPart

Kusek
A: 

The way you would normally do this is by creating a site definition using Visual Studio, in which you include all items that should be deployed to the site, like for instance the default page. This allows you control the creation of a new site.

Option 2 is creating a feature that does 2 things.

  • Deploy a new aspx called homepage.aspx to the site, this page contains the desired controls etc.

  • a feauture receiver that is executed when the feature is activated, which sets the site's homepage programmatically to be the newly deployed page.

Colin