Wednesday, October 11, 2006

SharePoint 2007 : WebParts in Modules

When adding web-parts to pages through modules, the 2007 syntax for the web-part is different. The section below shows (pretty much) the minimum you can get away with...

<AllUsersWebPart WebPartZoneID="Left" WebPartOrder="1">
<![CDATA[
                   <webParts>
<webPart xmlns="http://schemas.microsoft.com/WebPart/v3">
<metaData>
<type name="MultiplePartLibrary.Another, MultiplePartLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
<importErrorMessage>Cannot import this Web Part.</importErrorMessage>
</metaData>
<data>
<properties>
<property name="Title" type="string">Another</property>
</properties>
</data>
</webPart>
</webParts>
   
   
                   ]]>
</AllUsersWebPart>

SharePoint 2007 : Exporting web-parts

Whilst working with web-parts in 2007 I was expecting to find the same Export option when in edit mode. It wasn't there....

Turns out you need to enable export for a web-part through the Toolpane....

Under the Advanced section, there should be an Export Mode drop-down. Change the setting and you should see the Export menu appear as in 2003.

Thursday, October 05, 2006

Intellisense in SharePoint XML files

I got this from the Ted Pattison videos:

If you want intellisense in the SharePoint Feature/Solution/Onet xml files, then reference the schema in VStudio.

To do that, open the file you want to modify, open the Properties window in VStudio. In schemas, reference the following file:

C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\XML\wss.xsd

Wednesday, October 04, 2006

Master Pages and Static Tokens

We were having some drama provisioning master-pages through the modules mechanism, then getting the site pages to reference the correct master page.

Ended up with this in the site pages...


MasterPageFile="~site/_catalogs/masterpage/nick.master"

It doesn't seem to work using "~masterurl/nick.master" which I guess would be the obvious solution...

Thursday, September 21, 2006

Finding the relevant web.config in a MOSS environment

In the process of attempting to write a web-part for MOSS I was attempting to find the web.config in order to register the control as safe. To find the web.config, go to IIS manager, right click on the SharePoint web application, choose properties, then click on the Home Directory tab. You should see a path which goes something like wss\{GUID}. If you paste that into an explorer window, you should see the relevant web.config in the resulting directory...

Tuesday, September 19, 2006

MOSS Site Definitions and FeatureReceivers

It appears that the FeatureReceiver (FeatureActivited) method does not get called when a site is created if a List feature is referenced in the Site Definition.

I built a list feature with an associated FeatureReceiver assembly, and then referenced it in the site defintion. When a site was created, based on the def, the receiver was not called. However, manually activating the feature through the UI caused the method to fire...

Wednesday, September 13, 2006

Working with WSSv3 Lists and Features

Some initial findings from working with Site Definitions and Features

  • If you create a list definition as a feature, and reference it within a site definition, you need to manually install the feature using stsadm before it will work
  • Updates to the schema.xml file for a list definition within a feature will reflect automatically after an IISRESET without having to re-install the feature




Wednesday, May 24, 2006

Difference between Workflow in MOSS and WSS

The key benefit of workflow in MOSS over WSS appears to be the ability to use InfoPath forms. These will render both server side and within the Office2007 client apps. WSS appears to support the use of ASP.Net forms, but not InfoPath.